Ability to modify the output filename extension #425
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is really a feature suggestion with a bit of code attached.
I would like
tscto accept anoutExtparameter, so that I can differentiate generated-from-TS .js files from raw javascript files. This has all kinds of benefits, including easily.gitignore-ing files in a directory that contains both TypeScript sources and raw JavaScript (or, in my case, React components).For example, calling
tsc --outExt .ts.js types.tswill generatetypes.ts.jsinstead oftypes.js. Then, i can add*.ts.jsto my gitignore and dorequire("types.ts")(which Node/Browserify will resolve to "types.ts.js") in my raw JavaScript code.Does a PR like this have a chance to be accepted at all? If so, I'll go ahead and sign the Contribution License Agreement, but I prefer to avoid paperwork if this simply gets a "denied, we only accept bug fixes, sorry"-kind of response.
http://stackoverflow.com/questions/23408952/is-it-possible-to-have-typescript-output-in-different-file-extension shows that I'm not the only one looking for this.
I'll be happy to add tests and diagnostic messages and all that, so that it's entirely neat and tidy.