New —alwaysStrict
Invoking the compiler with —alwaysStrict
causes:
- Parses all the code in strict mode.
- Writes
"use strict";
directive atop every generated file.Modules are parsed automatically in strict mode.The new flag is recommended for non-module code.