fix: keep spec files' global declarations out of the published types (#3880)

This commit is contained in:
Jiayi (Bob) Fan
2026-11-03 14:54:44 +00:00
committed by GitHub
parent 5639a7fff2
commit a986bd68d7
+3
View File
@@ -18,6 +18,9 @@ export default defineConfig({
// lib files it can't follow symbols such as Readonly into
invokeOptions: { typescriptCompilerFolder: undefined },
},
// Specs aren't part of the package. A global declaration in one, such as corpus.spec.ts's for import.meta.glob,
// would otherwise be copied into the types and apply to every project that installs docx
exclude: ["**/*.spec.ts"],
// tsconfig.json removes comments, but the JSDoc in declarations is what users see in their editors
compilerOptions: { removeComments: false },
afterBuild: () => {