File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,7 @@ namespace ts {
354354 const strictPropertyInitialization = getStrictOptionValue(compilerOptions, "strictPropertyInitialization");
355355 const noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny");
356356 const noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
357+ const useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
357358 const keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
358359 const freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : ObjectFlags.FreshLiteral;
359360
@@ -8929,7 +8930,7 @@ namespace ts {
89298930 if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
89308931 const typeNode = getEffectiveTypeAnnotationNode(declaration);
89318932 if (typeNode === undefined) {
8932- return compilerOptions. useUnknownInCatchVariables ? unknownType : anyType;
8933+ return useUnknownInCatchVariables ? unknownType : anyType;
89338934 }
89348935 const type = getTypeOfNode(typeNode);
89358936 // an errorType will make `checkTryStatement` issue an error
Original file line number Diff line number Diff line change @@ -6067,6 +6067,7 @@ namespace ts {
60676067 | "strictBindCallApply"
60686068 | "strictPropertyInitialization"
60696069 | "alwaysStrict"
6070+ | "useUnknownInCatchVariables"
60706071 ;
60716072
60726073 export function getStrictOptionValue ( compilerOptions : CompilerOptions , flag : StrictOptionName ) : boolean {
You can’t perform that action at this time.
0 commit comments