Syntactic 'use strict' support #288
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Suggestion
An idea for TypeScript
Too Complex
An issue which adding support for may be too complex for the value it adds
A nice feature would be if the TypeScript language understood 'use strict' and made it easy to apply. Although TypeScript can't help regarding the semantics of strict mode, it can help make the code cleaner and prevent a mistyping of the magic string from silently changing run-time behavior.
Currently, I often put 'use strict' as the first line a module, like this:
It would be a nice parallel with the built-in-error checking of TypeScript's type safety if I could instead use a language keyword to indicate my intent:
where the latter TypeScript snippet would generate the same JavaScript as the former.
Importance of strict mode:
The text was updated successfully, but these errors were encountered: