From dd1fb7517b732332c8db74bcac9526d6c2a6b906 Mon Sep 17 00:00:00 2001 From: YixuanXu Date: Wed, 29 Sep 2021 13:52:52 +0800 Subject: [PATCH] fix-type-generation Author: YixuanXu --- package.json | 2 +- tsconfig.check.json | 7 +++++++ tsconfig.json | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 tsconfig.check.json diff --git a/package.json b/package.json index d9f2336fe..3c1746f3e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "build:immutable": "bunchee index.ts --cwd immutable -m --no-sourcemap", "prepublishOnly": "yarn clean && yarn build", "publish-beta": "yarn publish --tag beta", - "types:check": "tsc --noEmit && tsc --noEmit -p test", + "types:check": "tsc --noEmit --project tsconfig.check.json && tsc --noEmit -p test", "format": "prettier --write ./**/*.{ts,tsx}", "lint": "eslint . --ext .ts,.tsx --cache", "lint:fix": "yarn lint --fix", diff --git a/tsconfig.check.json b/tsconfig.check.json new file mode 100644 index 000000000..a1e69e7e9 --- /dev/null +++ b/tsconfig.check.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": ".", + }, + "include": ["src", "immutable", "infinite"] +} diff --git a/tsconfig.json b/tsconfig.json index 85be5980c..000075d68 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "noUnusedParameters": true, "strictBindCallApply": true, "outDir": "./dist", - "rootDir": ".", + "rootDir": "src", "strict": true, "target": "es5", "baseUrl": ".", @@ -24,7 +24,7 @@ }, "typeRoots": ["./src/types", "./node_modules/@types"] }, - "include": ["src", "immutable", "infinite"], + "include": ["src"], "exclude": ["./**/dist", "node_modules"], "watchOptions": { "watchFile": "useFsEvents",