Skip to content

Commit d49fadb

Browse files
authored
Fix type usage of Features (parcel-bundler#570)
1 parent 3930139 commit d49fadb

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ jobs:
3131
- uses: Swatinem/rust-cache@v2
3232
- run: yarn build
3333
- run: yarn test
34+
- run: yarn tsc

node/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export interface TransformOptions<C extends CustomAtRules> {
2424
/** The browser targets for the generated code. */
2525
targets?: Targets,
2626
/** Features that should always be compiled, even when supported by targets. */
27-
include?: Features,
27+
include?: number,
2828
/** Features that should never be compiled, even when unsupported by targets. */
29-
exclude?: Features,
29+
exclude?: number,
3030
/** Whether to enable parsing various draft syntax. */
3131
drafts?: Drafts,
3232
/** Whether to enable various non-standard syntax. */

node/tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"include": ["*.d.ts"],
3+
"compilerOptions": {
4+
"lib": ["ES2020"],
5+
"moduleResolution": "node",
6+
"isolatedModules": true,
7+
"noEmit": true,
8+
"strict": true
9+
}
10+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"website:start": "parcel 'website/*.html' website/playground/index.html",
9090
"website:build": "yarn wasm:build-release && parcel build 'website/*.html' website/playground/index.html",
9191
"build-ast": "cargo run --example schema --features jsonschema && node scripts/build-ast.js",
92+
"tsc": "tsc -p node/tsconfig.json",
9293
"test": "uvu node/test"
9394
}
9495
}

0 commit comments

Comments
 (0)