(node)
| 47512 | } |
| 47513 | } |
| 47514 | function bindClassLikeDeclaration(node) { |
| 47515 | if (node.kind === 257 /* SyntaxKind.ClassDeclaration */) { |
| 47516 | bindBlockScopedDeclaration(node, 32 /* SymbolFlags.Class */, 899503 /* SymbolFlags.ClassExcludes */); |
| 47517 | } |
| 47518 | else { |
| 47519 | var bindingName = node.name ? node.name.escapedText : "__class" /* InternalSymbolName.Class */; |
| 47520 | bindAnonymousDeclaration(node, 32 /* SymbolFlags.Class */, bindingName); |
| 47521 | // Add name of class expression into the map for semantic classifier |
| 47522 | if (node.name) { |
| 47523 | classifiableNames.add(node.name.escapedText); |
| 47524 | } |
| 47525 | } |
| 47526 | var symbol = node.symbol; |
| 47527 | // TypeScript 1.0 spec (April 2014): 8.4 |
| 47528 | // Every class automatically contains a static property member named 'prototype', the |
| 47529 | // type of which is an instantiation of the class type with type Any supplied as a type |
| 47530 | // argument for each type parameter. It is an error to explicitly declare a static |
| 47531 | // property member with the name 'prototype'. |
| 47532 | // |
| 47533 | // Note: we check for this here because this class may be merging into a module. The |
| 47534 | // module might have an exported variable called 'prototype'. We can't allow that as |
| 47535 | // that would clash with the built-in 'prototype' for the class. |
| 47536 | var prototypeSymbol = createSymbol(4 /* SymbolFlags.Property */ | 4194304 /* SymbolFlags.Prototype */, "prototype"); |
| 47537 | var symbolExport = symbol.exports.get(prototypeSymbol.escapedName); |
| 47538 | if (symbolExport) { |
| 47539 | if (node.name) { |
| 47540 | ts.setParent(node.name, node); |
| 47541 | } |
| 47542 | file.bindDiagnostics.push(createDiagnosticForNode(symbolExport.declarations[0], ts.Diagnostics.Duplicate_identifier_0, ts.symbolName(prototypeSymbol))); |
| 47543 | } |
| 47544 | symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); |
| 47545 | prototypeSymbol.parent = symbol; |
| 47546 | } |
| 47547 | function bindEnumDeclaration(node) { |
| 47548 | return ts.isEnumConst(node) |
| 47549 | ? bindBlockScopedDeclaration(node, 128 /* SymbolFlags.ConstEnum */, 899967 /* SymbolFlags.ConstEnumExcludes */) |
no test coverage detected
searching dependent graphs…