I am very new to TypeScript and I expect that I can import TS files without having to indicate that they are TS files.
I need to do
import {sealed} from "./decorators/decorators.ts";
instead of what I want to think, this is the right way, which
import {sealed} from "./decorators/decorators";
leading to errors indicating that it is looking for files ending in .js or .jsx
my tsconfig.json looks like this
{ "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" ]
}
source share