mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Remove redundant call to checkNodeDeferred (#22516)
* Remove redundant call to `checkNodeDeferred` * Use a set to speed up `contains` checks
This commit is contained in:
@@ -1205,16 +1205,6 @@ namespace ts {
|
||||
};
|
||||
}
|
||||
|
||||
/** Add a value to a set, and return true if it wasn't already present. */
|
||||
export function addToSeen(seen: Map<true>, key: string | number): boolean {
|
||||
key = String(key);
|
||||
if (seen.has(key)) {
|
||||
return false;
|
||||
}
|
||||
seen.set(key, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
export function getSnapshotText(snap: IScriptSnapshot): string {
|
||||
return snap.getText(0, snap.getLength());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user