Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

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

Open
motss opened this issue Sep 15, 2021 · 0 comments
Open

Comments

@motss
Copy link

motss commented Sep 15, 2021

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant