typescript-extract-type-json.ts view source
AliasRegistry import type {AliasRegistry} from 'svelte-docinfo/typescript-extract-type-json.js'; Identity-keyed registry of exported alias-lost type aliases, consulted by
the tree builder at nameless positions behind written-name recovery. Built
per analysis cycle by buildAliasRegistry (typescript-alias-registry.ts);
undefined wherever no pre-pass ran (registry recovery disabled, written
recovery unaffected).
byType
Checker type identity → the winning alias (compareStrings name-then-module tie-break).
type Map<Type, AliasRegistryEntry>
byMemberSet
Union member-set key (unionMemberSetKey) → the winning alias, for
registered unions only. Consulted at optional-widened positions, where a
null-bearing union flattens with the widening undefined into a type
object the identity lookup can never match — the registered members
survive by identity inside the widened union, so the set matches exactly.
type Map<string, AliasRegistryEntry>
warnedAliasLost
Alias declarations the alias_lost warning has fired for this cycle.
Re-export synthesis re-analyzes canonical declarations
(synthesizeCrossFileAlias, within-file renames), so one declaration can
reach warnAliasLost from several analyzing sites in a cycle — this set
dedupes to one warning per declaration. It rides on the registry because
the registry is the one cycle-scoped object every warn site already holds
(the warning is gated on a registry being in hand).
type Set<TypeAliasDeclaration>