-
Notifications
You must be signed in to change notification settings - Fork 90
/
tsconfig.json
30 lines (30 loc) · 1.46 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"compilerOptions": {
// We don't want to check node_modules
"skipLibCheck": true,
// @TODO: perhaps "emitDeclarationOnly" should be used here (build fails with it), need to
// investigate further https://www.typescriptlang.org/tsconfig#emitDeclarationOnly
// probably need to update rollup and its config
"noEmit": true,
"declaration": true,
"declarationMap": true,
"declarationDir": "./dist/types",
// Since we're using a bundler (rollup), and so TS isn't used to emit JS,
// this option should be set to "bundler"
// https://www.typescriptlang.org/docs/handbook/modules/reference.html#bundler
// However "module": "node16" or "nodenext" is a better option:
// https://www.typescriptlang.org/docs/handbook/modules/theory.html#module-resolution-for-libraries
// Also this should be applied too: https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax
"moduleResolution": "bundler",
// "moduleResolution" = "bundler" requires this to be "esnext"
"module": "esnext",
// Node.js 18 supports up to ES2022 according to https://www.npmjs.com/package/@tsconfig/node18
// This matters for the generated CJS and ESM file, UMD file is down-leveled further to support IE11
// (only the syntax, URL, URLSearchParams, fetch is not IE11 compatible) with the help of Babel.
"target": "es2022",
"lib": ["ESNext", "dom"],
"strict": true,
"noImplicitReturns": true
},
"include": ["src"]
}