register icon indicating copy to clipboard operation
register copied to clipboard

Cannot find TypeScript module with .js specifier in a TypeScript file

Open motss opened this issue 4 years ago • 0 comments

I'm not sure if this should be supported but it'd great to be able to import a TypeScript file with .js specifier in a TypeScript file, like so:

// module-a.ts
export const a = 100;

// main.ts
// import { a } from './module-a'; // it works without .js specifier
import { a } from './module-a.js'

console.debug(a); // 100

motss avatar Sep 15 '21 15:09 motss