after many years of node/js programming, I decided to learn typescript but am facing familiar (to many, as evident by SO questions) roadblocks and wondering if this pain is worth it.
My compiler options are
{
"compilerOptions": {
"outDir": "./dist",
"allowJs": true,
"target": "es6",
"esModuleInterop": true,
"skipLibCheck": true,
"types": []
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
and yet, tsc
checks and carps about wrong types in files in the node_modules
folder, and also
src/index.ts:125:21 - error TS2802: Type 'IterableIterator<number>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
even though my target is set to es6
What am I doing wrong?