@@ -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.
@@ -9203,10 +9203,11 @@ const _computedOptions = createComputedCompilerOptions({
92039203 return getStrictOptionValue ( compilerOptions , "strictBuiltinIteratorReturn" ) ;
92049204 } ,
92059205 } ,
9206+ // Previously a strict-mode flag, but no longer.
92069207 alwaysStrict : {
9207- dependencies : [ "strict" ] ,
9208+ dependencies : [ ] ,
92089209 computeValue : compilerOptions => {
9209- return getStrictOptionValue ( compilerOptions , " alwaysStrict" ) ;
9210+ return compilerOptions . alwaysStrict !== false ;
92109211 } ,
92119212 } ,
92129213 useUnknownInCatchVariables : {
@@ -9254,6 +9255,8 @@ export const getAreDeclarationMapsEnabled: (compilerOptions: CompilerOptions) =>
92549255export const getAllowJSCompilerOption : ( compilerOptions : CompilerOptions ) => boolean = _computedOptions . allowJs . computeValue ;
92559256/** @internal */
92569257export const getUseDefineForClassFields : ( compilerOptions : CompilerOptions ) => boolean = _computedOptions . useDefineForClassFields . computeValue ;
9258+ /** @internal */
9259+ export const getAlwaysStrict : ( compilerOptions : CompilerOptions ) => boolean = _computedOptions . alwaysStrict . computeValue ;
92579260
92589261/** @internal */
92599262export function emitModuleKindIsNonNodeESM ( moduleKind : ModuleKind ) : boolean {
@@ -9296,7 +9299,6 @@ export type StrictOptionName =
92969299 | "strictBindCallApply"
92979300 | "strictPropertyInitialization"
92989301 | "strictBuiltinIteratorReturn"
9299- | "alwaysStrict"
93009302 | "useUnknownInCatchVariables" ;
93019303
93029304/** @internal */
0 commit comments