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,
I had this error my_imported_module_1.MyModule is not a constructor
.
I was using the approach when I got this error:
import { MyModule } from 'my-module-sdk';
but I got it to work when I changed it to this approach:
const MyModule = require('my-module-sdk');
In my tsconfig.json, I have "target" set to "es5", and tried changing it "es6" and that still didn't help.
Here are some of my other tsconfig options:
"target": "es5",
"module": "esnext",
"declaration": true,
"rootDir": "./src",
"moduleResolution": "node",
"lib": ["es6", "dom", "es2016", "es2017", "es2018", "es2019",
"es2020"],
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"allowJs": false