Open
Description
tsc --init
- Discussed previously
- Example
tsconfig.json
.- tsc --init update 2024 #58420 (comment)
"rootDir": "src"
- Automatically sets
include
...right?- Probably not.
- Automatically sets
"target": "es2022"
- Feels modern enough.
- Maybe just do
esnext
"lib": ["dom", "esnext"]
- Need all the other
dom.*
libraries likedom.iterable
. - Or just use
"esnext.full"
- Need all the other
"module": "nodenext"
- But
bundler
?
- But
"skipLibCheck": true
- Disagreement about whether this is best practice, or even necessary for most projects.
- Node vs. browser?
- Link to https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping when targeting Node.js.