Switch to ES Map/Set internally (#33771)

* Add full implemention of Map and Set to shims

* Update default Map interface

* Remove WeakMap/WeakSet

* Add tests for set shim

* Update most usages of Map<K, true> to Set

* PR Feedback

* Fix lint issues

* Change key in fsWatchCallback

* Simpler shim, more tests

* Fix typo in collection shim
This commit is contained in:
Ron Buckton
2020-06-26 10:12:47 -07:00
committed by GitHub
parent 95690c0aca
commit eb2f4e2337
87 changed files with 1767 additions and 1135 deletions

View File

@@ -100,7 +100,7 @@ namespace ts {
if (option.name === "lib") {
description = getDiagnosticText(option.description);
const element = (<CommandLineOptionOfListType>option).element;
const typeMap = <Map<number | string>>element.type;
const typeMap = <Map<string, number | string>>element.type;
optionsDescriptionMap.set(description, arrayFrom(typeMap.keys()).map(key => `'${key}'`));
}
else {