Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type usage of Features #570

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}