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

add --outSuffix compiler option #32373

Closed
5 tasks done
xialvjun opened this issue Jul 12, 2019 · 1 comment
Closed
5 tasks done

add --outSuffix compiler option #32373

xialvjun opened this issue Jul 12, 2019 · 1 comment

Comments

@xialvjun
Copy link

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:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.
@xialvjun
Copy link
Author

Oh, sorry, before I didn't search keyword mjs... Now I find these issues:
#30076
#18442

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