I have an issue with transpiling ES7 code with TypeScript. This code:
const sizeByColor = {
red: 100,
green: 500,
};
for ( const [ color, size ] of
I can reproduce your problem when I have a global compiler but not local one in the ./node_modules.
In my case compiler just does not know which tsconfig.json file to use. Pointing it to particular tsconfig.json file helps:
tsc --project ./tsconfig.json
I have also added dom option to the lib, because es2017 does not recognize console:
"lib": [
"es2017",
"dom"
]