exclude all the lib.d.ts files when running the TS extractor directly

e.g. the `lib.es5.d.ts` file was not excluded
This commit is contained in:
erik-krogh
2023-12-12 10:29:09 +01:00
parent 96b793a877
commit 43b228dbb4

View File

@@ -895,7 +895,7 @@ if (process.argv.length > 2) {
virtualSourceRoot: null,
});
for (let sf of state.project.program.getSourceFiles()) {
if (pathlib.basename(sf.fileName) === "lib.d.ts") continue;
if (/lib\..*\.d\.ts/.test(pathlib.basename(sf.fileName)) || pathlib.basename(sf.fileName) === "lib.d.ts") continue;
handleParseCommand({
command: "parse",
filename: sf.fileName,