<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section. --> ## Search Terms out, suffix ## Suggestion add --outSuffix compiler option ## Use Cases `tsc --module es6 --outSuffix mjs` ## Examples ``` Imagine I have a package with file tree: my_package/ ├── a.ts ├── b.ts ├── index.ts ├── package.json └── tsconfig.json then I run: > tsc --module es6 --outSuffix mjs > tsc --module commonjs --outSuffix js then the file tree will be: my_package/ ├── a.d.ts ├── a.js ├── a.mjs ├── a.ts ├── b.d.ts ├── b.js ├── b.mjs ├── b.ts ├── index.d.ts ├── index.js ├── index.mjs ├── index.ts ├── package.json └── tsconfig.json ``` ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Activity
xialvjun commentedon Jul 12, 2019
Oh, sorry, before I didn't search keyword
mjs... Now I find these issues:#30076
#18442