Adds non-ambient context check

This commit is contained in:
Tingan Ho 2017-01-21 17:07:37 +01:00
parent 4ee8213dde
commit 7d773f18e0
No known key found for this signature in database
GPG Key ID: 3A0B614DA0893F2F

View File

@ -1,4 +1,4 @@
/// <reference path="moduleNameResolver.ts"/>
/// <reference path="moduleNameResolver.ts"/>
/// <reference path="binder.ts"/>
/* @internal */
@ -18337,7 +18337,11 @@ namespace ts {
const staticType = <ObjectType>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) {