Output .js files as read/execute only #14726
Labels
Out of Scope
This idea sits outside of the TypeScript language design constraints
Suggestion
An idea for TypeScript
Regarding this issue thread:
#843
It seems like it would be a nice-to-have to configure
tsc
to output .js files that were readonly/execute only. That would prevent people from editing the wrong file. (Editing the .js instead of editing the .ts/.tsx).This will be especially useful in conjunction with a "preserveWhitespace" compiler option which would make the outputted .js files look much more like source code than before such an option.
So in the compiler options, I would like to see something like:
or instead of that perhaps this:
I suppose it's possible that someone may wish to write out js code that was no executable either, or whatever.
like I was saying - I haven't had too many problems as of yet editing the wrong files but with a "preserveWhitespace" option in place, it will be much more likely to happen to unsuspecting developers.
The text was updated successfully, but these errors were encountered: