ArenaInterner Module
Functions and values
| Function or value |
Description
|
|
|
|
A STDLIB ALIAS whose name has a Fable substitution (`PropertyKey` -> obj, ...) remaps to the SUBSTITUTED intrinsic, not its nominal path: the name-keyed LibEs prelude interceptor sees only Interface/Class/Enum nodes, so an alias's nominal remap would emit a bare stdlib name with no definition anywhere (the CodeMode PropertyKey FS0039 class). Extracted from the interner walk for isolation tests.
|
Full Usage:
prerenderFromGraph ctx interner
Parameters:
GeneratorContext
interner : ArenaInterner
|
Performs prerendering of all types in the graph - the series of operations are performed in topological order, and provides guarantees of passing in deep transient filled type graphs such as with solid-js. The costs may outweigh the benefits in this scenario. Performance costs are significant.
|
|
True when a resolved type is memoised by the interner to a single shared instance (primitives, literals, globalThis). Such a type must NOT be used as a `TypeAliasRemap` key: the remap substitutes the alias name wherever that resolved type occurs, so aliasing a shared instance (e.g. `type D1SessionBookmark = string`, `type Mode = "primary-only"`) would make *every* occurrence of that primitive/literal render as the alias name across the entire surface. Only nominal/structural alias bodies are safe to remap.
|
Full Usage:
recordAliasArity ctx exportKeyType value
Parameters:
GeneratorContext
exportKeyType : ResolvedType
value : TypeAlias
|
Phase-2's PER-ALIAS emitted-arity recording (see prerenderTypeAliases), extracted
from the interner walk for isolation tests. Rules:
- GENERIC alias with a non-shareable body: record the EMITTED arity (declared
count if `aliasKeepsTypars`, else an explicit 0) against the body instance and
the (non-shareable) export-key instance; typars alongside when arity > 0 so
the padders synthesize per-slot defaults. CONSTRAINED typars do NOT gate
recording (2026-07-05): the historical exclusion existed because an `obj` pad
violated a nominal constraint (FS0001), obsolete since the typar-constraint
advisory-drop policy — leaving them unrecorded put refs on the
`typeArguments.Length` fallback (the Mcp BaseToolCallback given-2-of-3 class).
- NON-GENERIC alias: record an explicit 0 keyed ONLY by the export-key rt —
unique per export, so no shared-BODY write-once conflicts — letting the
aligners TRUNCATE spurious IR args (`RequestId = ProgressToken
|