From 8dd1cf67cfa869efefd99fc7bdad5697e6418ac2 Mon Sep 17 00:00:00 2001 From: Gabriela Araujo Britto Date: Mon, 9 Aug 2021 17:03:56 -0700 Subject: [PATCH] add call to getParseTreeNode --- src/compiler/checker.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b0a74e778fa..7e21b6fcf67 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -736,8 +736,10 @@ namespace ts { getLocalTypeParametersOfClassOrInterfaceOrTypeAlias, isDeclarationVisible, - isPropertyAccessible: (node, isSuper, writing, type, prop) => { - return checkPropertyAccessibilityAtNode(node, isSuper, writing, type, prop).result === TypeChecks.Ok; + isPropertyAccessible: (nodeIn, isSuper, writing, type, prop) => { + const node = getParseTreeNode(nodeIn); + return node ? + checkPropertyAccessibilityAtNode(node, isSuper, writing, type, prop).result === TypeChecks.Ok : false; } };