Skip to content

Commit a037407

Browse files
authored
Remove createUnderscoreEscapedMultiMap (#53029)
1 parent 7481434 commit a037407

2 files changed

Lines changed: 2 additions & 23 deletions

File tree

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ import {
110110
createGetCanonicalFileName,
111111
createGetSymbolWalker,
112112
createModeAwareCacheKey,
113+
createMultiMap,
113114
createPrinterWithDefaults,
114115
createPrinterWithRemoveComments,
115116
createPrinterWithRemoveCommentsNeverAsciiEscape,
116117
createPrinterWithRemoveCommentsOmitTrailingSemicolon,
117118
createPropertyNameNodeForIdentifierOrLiteral,
118119
createSymbolTable,
119120
createTextWriter,
120-
createUnderscoreEscapedMultiMap,
121121
Debug,
122122
Declaration,
123123
DeclarationName,
@@ -7187,7 +7187,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
71877187
}
71887188
const mayHaveNameCollisions = !(context.flags & NodeBuilderFlags.UseFullyQualifiedType);
71897189
/** Map from type reference identifier text to [type, index in `result` where the type node is] */
7190-
const seenNames = mayHaveNameCollisions ? createUnderscoreEscapedMultiMap<[Type, number]>() : undefined;
7190+
const seenNames = mayHaveNameCollisions ? createMultiMap<__String, [Type, number]>() : undefined;
71917191
const result: TypeNode[] = [];
71927192
let i = 0;
71937193
for (const type of types) {

src/compiler/core.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
SortedArray,
1313
SortedReadonlyArray,
1414
TextSpan,
15-
UnderscoreEscapedMap,
1615
} from "./_namespaces/ts";
1716

1817

@@ -1657,26 +1656,6 @@ function multiMapRemove<K, V>(this: MultiMap<K, V>, key: K, value: V) {
16571656
}
16581657
}
16591658

1660-
/** @internal */
1661-
export interface UnderscoreEscapedMultiMap<T> extends UnderscoreEscapedMap<T[]> {
1662-
/**
1663-
* Adds the value to an array of values associated with the key, and returns the array.
1664-
* Creates the array if it does not already exist.
1665-
*/
1666-
add(key: __String, value: T): T[];
1667-
/**
1668-
* Removes a value from an array of values associated with the key.
1669-
* Does not preserve the order of those values.
1670-
* Does nothing if `key` is not in `map`, or `value` is not in `map[key]`.
1671-
*/
1672-
remove(key: __String, value: T): void;
1673-
}
1674-
1675-
/** @internal */
1676-
export function createUnderscoreEscapedMultiMap<T>(): UnderscoreEscapedMultiMap<T> {
1677-
return createMultiMap() as UnderscoreEscapedMultiMap<T>;
1678-
}
1679-
16801659
/** @internal */
16811660
export function createQueue<T>(items?: readonly T[]): Queue<T> {
16821661
const elements: (T | undefined)[] = items?.slice() || [];

0 commit comments

Comments
 (0)