forked from microsoft/TypeScript-DOM-lib-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
18 lines (16 loc) · 669 Bytes
/
Copy pathindex.js
File metadata and controls
18 lines (16 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { execSync } from "child_process";
import { readdir } from "fs/promises";
for (const filename of await readdir(new URL("files/", import.meta.url))) {
if (filename.endsWith(".ts")) {
execSync(`npx tsc generated/dom.generated.d.ts unittests/files/${filename} --target es2020 --lib es2020 --types --noEmit`, {
stdio: "inherit"
});
}
}
for (const filename of await readdir(new URL("files/audioworklet", import.meta.url))) {
if (filename.endsWith(".ts")) {
execSync(`npx tsc generated/audioworklet.generated.d.ts unittests/files/audioworklet/${filename} --target es2020 --lib es2020 --types --noEmit`, {
stdio: "inherit"
});
}
}