Commit f529457 1 parent cd08b62 commit f529457 Copy full SHA for f529457
File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,7 @@ namespace ts {
354
354
const strictPropertyInitialization = getStrictOptionValue(compilerOptions, "strictPropertyInitialization");
355
355
const noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny");
356
356
const noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
357
+ const useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
357
358
const keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
358
359
const freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : ObjectFlags.FreshLiteral;
359
360
@@ -8929,7 +8930,7 @@ namespace ts {
8929
8930
if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
8930
8931
const typeNode = getEffectiveTypeAnnotationNode(declaration);
8931
8932
if (typeNode === undefined) {
8932
- return compilerOptions. useUnknownInCatchVariables ? unknownType : anyType;
8933
+ return useUnknownInCatchVariables ? unknownType : anyType;
8933
8934
}
8934
8935
const type = getTypeOfNode(typeNode);
8935
8936
// an errorType will make `checkTryStatement` issue an error
Original file line number Diff line number Diff line change @@ -6067,6 +6067,7 @@ namespace ts {
6067
6067
| "strictBindCallApply"
6068
6068
| "strictPropertyInitialization"
6069
6069
| "alwaysStrict"
6070
+ | "useUnknownInCatchVariables"
6070
6071
;
6071
6072
6072
6073
export function getStrictOptionValue ( compilerOptions : CompilerOptions , flag : StrictOptionName ) : boolean {
You can’t perform that action at this time.
0 commit comments