@@ -2132,7 +2132,7 @@ export function isEffectiveStrictModeSourceFile(node: SourceFile, compilerOption
21322132 return false ;
21332133 }
21342134 // If `alwaysStrict` is set, then treat the file as strict.
2135- if ( getStrictOptionValue ( compilerOptions , "alwaysStrict" ) ) {
2135+ if ( getAlwaysStrict ( compilerOptions ) ) {
21362136 return true ;
21372137 }
21382138 // Starting with a "use strict" directive indicates the file is strict.
@@ -9212,10 +9212,11 @@ const _computedOptions = createComputedCompilerOptions({
92129212 return getStrictOptionValue ( compilerOptions , "strictBuiltinIteratorReturn" ) ;
92139213 } ,
92149214 } ,
9215+ // Previously a strict-mode flag, but no longer.
92159216 alwaysStrict : {
9216- dependencies : [ "strict" ] ,
9217+ dependencies : [ ] ,
92179218 computeValue : compilerOptions => {
9218- return getStrictOptionValue ( compilerOptions , " alwaysStrict" ) ;
9219+ return compilerOptions . alwaysStrict !== false ;
92199220 } ,
92209221 } ,
92219222 useUnknownInCatchVariables : {
@@ -9263,6 +9264,8 @@ export const getAreDeclarationMapsEnabled: (compilerOptions: CompilerOptions) =>
92639264export const getAllowJSCompilerOption : ( compilerOptions : CompilerOptions ) => boolean = _computedOptions . allowJs . computeValue ;
92649265/** @internal */
92659266export const getUseDefineForClassFields : ( compilerOptions : CompilerOptions ) => boolean = _computedOptions . useDefineForClassFields . computeValue ;
9267+ /** @internal */
9268+ export const getAlwaysStrict : ( compilerOptions : CompilerOptions ) => boolean = _computedOptions . alwaysStrict . computeValue ;
92669269
92679270/** @internal */
92689271export function emitModuleKindIsNonNodeESM ( moduleKind : ModuleKind ) : boolean {
@@ -9305,7 +9308,6 @@ export type StrictOptionName =
93059308 | "strictBindCallApply"
93069309 | "strictPropertyInitialization"
93079310 | "strictBuiltinIteratorReturn"
9308- | "alwaysStrict"
93099311 | "useUnknownInCatchVariables" ;
93109312
93119313/** @internal */
0 commit comments