As someone new to TypeScript, I was under the impression that I could import my TS files without specifying their file type.
Currently, I have to write:
import {sealed} from "./decorators/decorators.ts";
Instead of what I believe should be the correct way:
import {sealed} from "./decorators/decorators";
This leads to errors suggesting that only files ending in .js or .jsx are being sought after.
My tsconfig.json has the following configuration:
{
"compileOnSave": true,
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"jsx": "react",
"allowJs": true,
"target": "es6",
"removeComments": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
"exclude": [
"node_modules",
"typings/browser",
"typings/browser.d.ts"
]
}