Skip to content

Commit

Permalink
Type check
Browse files Browse the repository at this point in the history
  • Loading branch information
w8r committed Sep 13, 2024
1 parent 77a2863 commit 6f82e4b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"format": "prettier -w src/**/*.{ts,tsx} demo/**/*.{ts,tsx} test/**/*.{ts,tsx}",
"test": "vitest",
"test:unit": "vitest run --coverage --reporter=junit --reporter=default --outputFile reports/unit/junit-test-results.xml",
"typecheck": "tsc --noEmit",
"typecheck": "tsc --noEmit --skipLibCheck --project tsconfig.build.json",
"types": "dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts --no-banner",
"postversion": "sync_versions",
"doc:publish": "npm run build:demo && gh-pages -d demo/dist"
Expand Down
1 change: 1 addition & 0 deletions test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ afterEach(() => {
cleanup();
});

// @ts-ignore
const customRender = (ui: React.ReactElement, options = {}) =>
render(ui, {
// wrap provider(s) here if needed
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true
},
"include": ["src/**/*"]
}
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"strict": true,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"strictNullChecks": true /* Enable strict null checks. */,
Expand All @@ -18,7 +16,7 @@
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
"importHelpers": true,
"skipLibCheck": true,
"skipLibCheck": false,
"jsx": "react-jsx",
"outDir": "./dist/",
"types": ["node", "jest"],
Expand Down

0 comments on commit 6f82e4b

Please sign in to comment.