I\'m working in typescript 1.5 in visual studio. I have a main class called app.ts, and another called FizzBuzzManager.ts. I can\'t figure out what is wrong with this code,
In my case I had the problem when I used babel with preset-env to compile TS-sources.
Works:
{
"presets": ["@babel/typescript"],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread",
"@babel/plugin-transform-runtime"
],
"ignore": ["node_modules", "src/test"]
}
Wrong:
{
"presets": [
"@babel/typescript",
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"last 2 Chrome versions",
"last 1 Safari versions",
"last 1 Firefox versions"
]
}
}
]
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread",
"@babel/plugin-transform-runtime"
],
"env": {
"node": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"esmodules": true,
"node": "current"
},
"modules": "auto"
}
]
]
}
},
"ignore": ["node_modules", "src/test"]
}