Remove redundant call to checkNodeDeferred (#22516)

* Remove redundant call to `checkNodeDeferred`

* Use a set to speed up `contains` checks
This commit is contained in:
Andy
2018-03-13 15:46:25 -07:00
committed by GitHub
parent e41feab3bd
commit 23a64fe804
3 changed files with 13 additions and 11 deletions
-10
View File
@@ -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());
}