From 7d773f18e09de59fc49090307b5980529fe97d0d Mon Sep 17 00:00:00 2001 From: Tingan Ho Date: Sat, 21 Jan 2017 17:07:37 +0100 Subject: [PATCH] Adds non-ambient context check --- src/compiler/checker.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5f80444c73e..2cac77bf576 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1,4 +1,4 @@ -/// +/// /// /* @internal */ @@ -18337,7 +18337,11 @@ namespace ts { const staticType = getTypeOfSymbol(symbol); checkTypeParameterListsIdentical(node, symbol); checkClassForDuplicateDeclarations(node); + + // Only check for reserved static identifiers on non-ambient context. + if (!isInAmbientContext(node)) { checkClassForStaticPropertyNameConflicts(node); + } const baseTypeNode = getClassExtendsHeritageClauseElement(node); if (baseTypeNode) {