TypeScript's own typescript.d.ts uses Map and ReadonlyMap without a /// <reference lib="es2015" /> directive. This causes type errors when the file is checked outside of a tsconfig scope that includes ES2015+ lib types.
Examples in typescript@5.9.3 (lib/typescript.d.ts):
// line 2589
abstract readonly typesRegistry: Map<string, MapLike<string>>;
// line 6592-6596
type ReadonlyUnderscoreEscapedMap<T> = ReadonlyMap<__String, T>;
type UnderscoreEscapedMap<T> = Map<__String, T>;
type SymbolTable = Map<__String, Symbol>;
Suggested fix: Add /// <reference lib="es2015" /> at the top of lib/typescript.d.ts.