Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .mts, .cts, .d.mts, and .d.cts #90

Open
mikestopcontinues opened this issue Jun 2, 2023 · 0 comments
Open

Support .mts, .cts, .d.mts, and .d.cts #90

mikestopcontinues opened this issue Jun 2, 2023 · 0 comments

Comments

@mikestopcontinues
Copy link

Much like .mjs and .cjs use the .ts icon, .mts and .cts should use the .ts icon.

Similar logic applies to .d.mts and .d.cts.

Here's the typescript docs:

Node.js supports two extensions to help with this: .mjs and .cjs. .mjs files are always ES modules, and .cjs files are always CommonJS modules, and there’s no way to override these.

In turn, TypeScript supports two new source file extensions: .mts and .cts. When TypeScript emits these to JavaScript files, it will emit them to .mjs and .cjs respectively.

Furthermore, TypeScript also supports two new declaration file extensions: .d.mts and .d.cts. When TypeScript generates declaration files for .mts and .cts, their corresponding extensions will be .d.mts and .d.cts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant