Skip to content

Commit

Permalink
Fix type usage of Features (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre committed Aug 27, 2023
1 parent 3930139 commit d49fadb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: yarn build
- run: yarn test
- run: yarn tsc
4 changes: 2 additions & 2 deletions node/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export interface TransformOptions<C extends CustomAtRules> {
/** 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. */
Expand Down
10 changes: 10 additions & 0 deletions node/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": ["*.d.ts"],
"compilerOptions": {
"lib": ["ES2020"],
"moduleResolution": "node",
"isolatedModules": true,
"noEmit": true,
"strict": true
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit d49fadb

Please sign in to comment.