Skip to content

Commit 8c35573

Browse files
authored
set skipLibCheck to true in tsconfig (#245)
when running `tsc` on a project inited with this template (v6.9.0), the following errors are thrown: ``` node_modules/@types/node/globals.d.ts:47:11 - error TS2300: Duplicate identifier 'AbortController'. 47 interface AbortController { ~~~~~~~~~~~~~~~ node_modules/@types/react-native/globals.d.ts:435:15 435 declare class AbortController { ~~~~~~~~~~~~~~~ 'AbortController' was also declared here. node_modules/@types/node/globals.d.ts:60:11 - error TS2300: Duplicate identifier 'AbortSignal'. 60 interface AbortSignal { ~~~~~~~~~~~ node_modules/@types/react-native/globals.d.ts:400:15 400 declare class AbortSignal implements EventTarget { ~~~~~~~~~~~ 'AbortSignal' was also declared here. node_modules/@types/node/globals.d.ts:67:13 - error TS2300: Duplicate identifier 'AbortController'. 67 declare var AbortController: { ~~~~~~~~~~~~~~~ node_modules/@types/react-native/globals.d.ts:435:15 435 declare class AbortController { ~~~~~~~~~~~~~~~ 'AbortController' was also declared here. node_modules/@types/node/globals.d.ts:72:13 - error TS2300: Duplicate identifier 'AbortSignal'. 72 declare var AbortSignal: { ~~~~~~~~~~~ node_modules/@types/react-native/globals.d.ts:400:15 400 declare class AbortSignal implements EventTarget { ~~~~~~~~~~~ 'AbortSignal' was also declared here. node_modules/@types/react-native/globals.d.ts:400:15 - error TS2300: Duplicate identifier 'AbortSignal'. 400 declare class AbortSignal implements EventTarget { ~~~~~~~~~~~ node_modules/@types/node/globals.d.ts:60:11 60 interface AbortSignal { ~~~~~~~~~~~ 'AbortSignal' was also declared here. node_modules/@types/node/globals.d.ts:72:13 72 declare var AbortSignal: { ~~~~~~~~~~~ and here. node_modules/@types/react-native/globals.d.ts:435:15 - error TS2300: Duplicate identifier 'AbortController'. 435 declare class AbortController { ~~~~~~~~~~~~~~~ node_modules/@types/node/globals.d.ts:47:11 47 interface AbortController { ~~~~~~~~~~~~~~~ 'AbortController' was also declared here. node_modules/@types/node/globals.d.ts:67:13 67 declare var AbortController: { ~~~~~~~~~~~~~~~ and here. ``` Setting [skipLibCheck](https://www.typescriptlang.org/tsconfig#skipLibCheck) to true avoids duplication errors and also save time during compilation
1 parent 70ea469 commit 8c35573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
4646
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
4747
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
48-
"skipLibCheck": false, /* Skip type checking of declaration files. */
48+
"skipLibCheck": true, /* Skip type checking of declaration files. */
4949
"resolveJsonModule": true /* Allows importing modules with a ‘.json’ extension, which is a common practice in node projects. */
5050

5151
/* Source Map Options */

0 commit comments

Comments
 (0)