File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed
Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 22
33> Shared [ TypeScript config] ( https://www.typescriptlang.org/docs/handbook/tsconfig-json.html ) for my projects
44
5+ This config makes TypeScript not do any polyfilling, so only use syntax and features available in the JavaScript environments you target.
6+
57## Install
68
79``` sh
@@ -19,14 +21,3 @@ npm install --save-dev @sindresorhus/tsconfig
1921 "extends" : " @sindresorhus/tsconfig"
2022}
2123```
22-
23- When you are targeting a higher version of Node.js, check the relevant ECMAScript version and add it as ` target ` :
24-
25- ``` json
26- {
27- "extends" : " @sindresorhus/tsconfig" ,
28- "compilerOptions" : {
29- "target" : " ES2023"
30- }
31- }
32- ```
Original file line number Diff line number Diff line change 44 "module" : " node16" ,
55 "moduleResolution" : " node16" ,
66 "moduleDetection" : " force" ,
7- "target" : " ES2022 " , // Node.js 18
7+ "target" : " esnext " ,
88 "lib" : [
99 " DOM" ,
1010 " DOM.Iterable" ,
11- " ES2022"
11+ " ES2022" // Node.js 18
1212 ],
1313 "resolveJsonModule" : false , // ESM doesn't yet support JSON modules.
1414 "jsx" : " react" ,
You can’t perform that action at this time.
0 commit comments