Same trick for symbol.id
, and always set it to 0.
This commit is contained in:
parent
f9d2db3540
commit
ced38f315e
|
@ -287,12 +287,13 @@ namespace ts {
|
|||
}
|
||||
|
||||
export function getSymbolId(symbol: Symbol): SymbolId {
|
||||
if (!symbol.id) {
|
||||
symbol.id = nextSymbolId;
|
||||
let id = symbol.id;
|
||||
if (!id) {
|
||||
symbol.id = id = nextSymbolId;
|
||||
nextSymbolId++;
|
||||
}
|
||||
|
||||
return symbol.id;
|
||||
return id;
|
||||
}
|
||||
|
||||
export function isInstantiatedModule(node: ModuleDeclaration, preserveConstEnums: boolean) {
|
||||
|
|
|
@ -4900,7 +4900,7 @@ namespace ts {
|
|||
members?: SymbolTable; // Class, interface or object literal instance members
|
||||
exports?: SymbolTable; // Module exports
|
||||
globalExports?: SymbolTable; // Conditional global UMD exports
|
||||
/* @internal */ id?: SymbolId; // Unique id (used to look up SymbolLinks)
|
||||
/* @internal */ id: SymbolId; // Unique id (used to look up SymbolLinks)
|
||||
/* @internal */ mergeId?: number; // Merge id (used to look up merged symbol)
|
||||
/* @internal */ parent?: Symbol; // Parent symbol
|
||||
/* @internal */ exportSymbol?: Symbol; // Exported symbol associated with this symbol
|
||||
|
|
|
@ -5798,7 +5798,7 @@ namespace ts {
|
|||
this.escapedName = name;
|
||||
this.declarations = undefined;
|
||||
this.valueDeclaration = undefined;
|
||||
this.id = undefined;
|
||||
this.id = 0;
|
||||
this.mergeId = undefined;
|
||||
this.parent = undefined;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue