私は TypeScript に非常に慣れていないので、TS ファイルであることを指定しなくても、TS ファイルをインポートできるはずです。
私がしなければなりません
import {sealed} from "./decorators/decorators.ts";
私が望むのではなく、正しい方法だと思います
import {sealed} from "./decorators/decorators";
その結果、.js または .jsx で終わるファイルのみを探していることを示すエラーが発生します。
私の tsconfig.json は次のようになります
{
"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"
]
}