-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
84 lines (66 loc) · 2.91 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
{
"compilerOptions": {
// Enables strict type-checking options
"strict": true,
// Specifies the ECMAScript target version
"target": "es2020",
// Specifies the module code generation
"module": "es2020",
// Modules resolution:
// - "node" = Mimics Node.js' module resolution mechanism. Looks inside
// `node_modules` and works with both `.js` and `.json` files. Compatible
// with CJS and ES6 module syntax.
// - "bundler" = Supports package.json "imports" and "exports", but unlike
// the Node.js resolution modes, bundler never requires file extensions on
// relative paths in imports.
// - "classic" = TypeScript's original resolution strategy. Doesn't consider
// `node_modules` or understand JSON files and is less commonly used today.
// - https://github.com/babel/babel/issues/10237#issuecomment-513028440
// - https://www.typescriptlang.org/tsconfig#moduleResolution
"moduleResolution": "node",
// Support non "* as" imports; ex:
// `import React from 'react'` instead of `import * as React from 'react'`
"allowSyntheticDefaultImports": true,
// Changes the emitted JavaScript to add an extra layer of compatibility for
// default imports
"esModuleInterop": true,
// Allows JavaScript files to be imported
// - Needed with ^.+\\.[tj]sx?$ Jest transform so .js `node_modules` are capable of
// being imported
// - Disabled by default due to not needing to be enabled by default - usually needed
// importing/testing things in `node_modules` due to own project being TypeScript
// - Needed for demo application for JSON syntax highlighting
"allowJs": true,
// Additional libs that are available in the global context
"lib": [
// Dom (ex: window, document)
"dom",
"dom.iterable",
// ESNext for modern JS features (ex: Map, Set)
"esnext"
],
// TSX/JSX support:
// - Controls how JSX constructs are emitted in `.js` files
// - Only affects the output of JS files that started in `.tsx` files
// - "react-jsx" uses new React 17 compilation
// - "react-jsxdev" for more debugging information
"jsx" : "react-jsx",
// Path aliases
// - Used to avoid excessive relative pathing and/or weird absolute pathing hacks
"paths" : {
"@assets/*" : [ "./assets/*" ],
"@src/*" : [ "./src/*" ]
},
},
"include": [
// Jest setup
"jest_setup.ts",
// Include global type definitions
"types/**/*.d.ts",
// Include everything in src directory
"src/**/*",
// Include everything in tests directory
"tests/**/*",
],
"exclude": []
}