mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Remove createUnderscoreEscapedMultiMap (#53029)
This commit is contained in:
parent
74814345ce
commit
a0374077dd
@ -110,6 +110,7 @@ import {
|
||||
createGetCanonicalFileName,
|
||||
createGetSymbolWalker,
|
||||
createModeAwareCacheKey,
|
||||
createMultiMap,
|
||||
createPrinterWithDefaults,
|
||||
createPrinterWithRemoveComments,
|
||||
createPrinterWithRemoveCommentsNeverAsciiEscape,
|
||||
@ -117,7 +118,6 @@ import {
|
||||
createPropertyNameNodeForIdentifierOrLiteral,
|
||||
createSymbolTable,
|
||||
createTextWriter,
|
||||
createUnderscoreEscapedMultiMap,
|
||||
Debug,
|
||||
Declaration,
|
||||
DeclarationName,
|
||||
@ -7187,7 +7187,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
const mayHaveNameCollisions = !(context.flags & NodeBuilderFlags.UseFullyQualifiedType);
|
||||
/** Map from type reference identifier text to [type, index in `result` where the type node is] */
|
||||
const seenNames = mayHaveNameCollisions ? createUnderscoreEscapedMultiMap<[Type, number]>() : undefined;
|
||||
const seenNames = mayHaveNameCollisions ? createMultiMap<__String, [Type, number]>() : undefined;
|
||||
const result: TypeNode[] = [];
|
||||
let i = 0;
|
||||
for (const type of types) {
|
||||
|
||||
@ -12,7 +12,6 @@ import {
|
||||
SortedArray,
|
||||
SortedReadonlyArray,
|
||||
TextSpan,
|
||||
UnderscoreEscapedMap,
|
||||
} from "./_namespaces/ts";
|
||||
|
||||
|
||||
@ -1657,26 +1656,6 @@ function multiMapRemove<K, V>(this: MultiMap<K, V>, key: K, value: V) {
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export interface UnderscoreEscapedMultiMap<T> extends UnderscoreEscapedMap<T[]> {
|
||||
/**
|
||||
* Adds the value to an array of values associated with the key, and returns the array.
|
||||
* Creates the array if it does not already exist.
|
||||
*/
|
||||
add(key: __String, value: T): T[];
|
||||
/**
|
||||
* Removes a value from an array of values associated with the key.
|
||||
* Does not preserve the order of those values.
|
||||
* Does nothing if `key` is not in `map`, or `value` is not in `map[key]`.
|
||||
*/
|
||||
remove(key: __String, value: T): void;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function createUnderscoreEscapedMultiMap<T>(): UnderscoreEscapedMultiMap<T> {
|
||||
return createMultiMap() as UnderscoreEscapedMultiMap<T>;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function createQueue<T>(items?: readonly T[]): Queue<T> {
|
||||
const elements: (T | undefined)[] = items?.slice() || [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user