diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0bc1cd61fcf..b2a0629cc71 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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) { diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 2dc7f533c76..e24f79ef628 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -12,7 +12,6 @@ import { SortedArray, SortedReadonlyArray, TextSpan, - UnderscoreEscapedMap, } from "./_namespaces/ts"; @@ -1657,26 +1656,6 @@ function multiMapRemove(this: MultiMap, key: K, value: V) { } } -/** @internal */ -export interface UnderscoreEscapedMultiMap extends UnderscoreEscapedMap { - /** - * 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(): UnderscoreEscapedMultiMap { - return createMultiMap() as UnderscoreEscapedMultiMap; -} - /** @internal */ export function createQueue(items?: readonly T[]): Queue { const elements: (T | undefined)[] = items?.slice() || [];