diff --git a/package.json b/package.json index 21cfb9a..6b5aab3 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/test/utils.ts b/test/utils.ts index 13c294e..f04c95e 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -6,6 +6,7 @@ afterEach(() => { cleanup(); }); +// @ts-ignore const customRender = (ui: React.ReactElement, options = {}) => render(ui, { // wrap provider(s) here if needed diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..9444c72 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "declaration": true, + "declarationMap": true + }, + "include": ["src/**/*"] +} diff --git a/tsconfig.json b/tsconfig.json index 582c5a1..00effb0 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -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. */, @@ -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"],