-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtsconfig.json
32 lines (29 loc) · 1.74 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
31
32
{
"compilerOptions": {
// project options
"lib": ["ESNext"], // specifies which default set of type definitions to use ("DOM", "ES6", etc)
"outDir": "./dist", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory.,
"removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space
"target": "es6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3)
"module": "CommonJS",
"declaration": true,
"resolveJsonModule": true,
// Module resolution
"baseUrl": "./src", // Lets you set a base directory to resolve non-absolute module names.
"esModuleInterop": true, // fixes some issues TS originally had with the ES6 spec where TypeScript treats CommonJS/AMD/UMD modules similar to ES6 module
"moduleResolution": "node", // Pretty much always node for modern JS. Other option is "classic"
"paths": {}, // A series of entries which re-map imports to lookup locations relative to the baseUrl
// Source Map
"sourceMap": true, // enables the use of source maps for debuggers and error reporting etc
"sourceRoot": "/src", // Specify the location where a debugger should locate TypeScript files instead of relative source locations.
// Strict Checks
"strict": true,
// Linter Checks
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true, // accessing index must always check for undefined
"noUnusedLocals": true, // Report errors on unused local variables.
"noUnusedParameters": true // Report errors on unused parameters in functions
},
"include": ["./**/*.ts"],
"exclude": ["node_modules/**/*"]
}