Skip to content

Commit 4c18b2b

Browse files
Simplify code.
1 parent a85c277 commit 4c18b2b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/compiler/binder.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,12 @@ module ts {
513513
// We do that by making an anonymous type literal symbol, and then setting the function
514514
// symbol as its sole member. To the rest of the system, this symbol will be indistinguishable
515515
// from an actual type literal symbol you would have gotten had you used the long form.
516-
let name = getDeclarationName(node);
517-
let symbol = createSymbol(SymbolFlags.Signature, name);
516+
let symbol = createSymbol(SymbolFlags.Signature, getDeclarationName(node));
518517
addDeclarationToSymbol(symbol, node, SymbolFlags.Signature);
519518

520519
let typeLiteralSymbol = createSymbol(SymbolFlags.TypeLiteral, "__type");
521520
addDeclarationToSymbol(typeLiteralSymbol, node, SymbolFlags.TypeLiteral);
522-
typeLiteralSymbol.members = { [name]: symbol };
521+
typeLiteralSymbol.members = { [symbol.name]: symbol };
523522
}
524523

525524
function bindAnonymousDeclaration(node: Declaration, symbolFlags: SymbolFlags, name: string) {

0 commit comments

Comments
 (0)