diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8a765fd..a7e2b629 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,3 +31,4 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: yarn build - run: yarn test + - run: yarn tsc diff --git a/node/index.d.ts b/node/index.d.ts index 8bf1cbb1..92a7365c 100644 --- a/node/index.d.ts +++ b/node/index.d.ts @@ -24,9 +24,9 @@ export interface TransformOptions { /** The browser targets for the generated code. */ targets?: Targets, /** Features that should always be compiled, even when supported by targets. */ - include?: Features, + include?: number, /** Features that should never be compiled, even when unsupported by targets. */ - exclude?: Features, + exclude?: number, /** Whether to enable parsing various draft syntax. */ drafts?: Drafts, /** Whether to enable various non-standard syntax. */ diff --git a/node/tsconfig.json b/node/tsconfig.json new file mode 100644 index 00000000..9b82eaa4 --- /dev/null +++ b/node/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["*.d.ts"], + "compilerOptions": { + "lib": ["ES2020"], + "moduleResolution": "node", + "isolatedModules": true, + "noEmit": true, + "strict": true + } +} diff --git a/package.json b/package.json index f6cff42f..1c28b43d 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,7 @@ "website:start": "parcel 'website/*.html' website/playground/index.html", "website:build": "yarn wasm:build-release && parcel build 'website/*.html' website/playground/index.html", "build-ast": "cargo run --example schema --features jsonschema && node scripts/build-ast.js", + "tsc": "tsc -p node/tsconfig.json", "test": "uvu node/test" } }