RenderScope_Prelude Module
Nested modules
| Modules | Description |
|
|
|
|
|
Functions and values
| Function or value |
Description
|
Full Usage:
boundName full
Parameters:
string
Returns: string
|
Bound an underscore-joined token string to a legible identifier. A short name (<=40 char) is kept verbatim; a long one is truncated to a readable prefix (first 3 tokens, capped 28 char) plus a content-stable FNV-1a hash of the FULL string for UNIQUENESS. Deterministic and collision-safe (distinct full strings differ in the hash). Shared by every canonical-home name path (literal-union enums AND shared object-literals) so the two cannot diverge — an unbounded SharedLiterals name (335-char keyof-Array smash) was exactly such a divergence.
|
Full Usage:
isHoistableObjectLiteral typeLiteral
Parameters:
TypeLiteral
Returns: bool
|
True when a `TypeLiteral` renders as a HOISTED named object-type (the `_, _` arm of the TypeLiteral prerender below) rather than inlining to `obj` (empty) or a bare function signature (single inline call-signature). Only such literals are placed under a per-owner transient and can therefore become owner-dependent shared-literal dangles — so only these are candidates for the union-member reference-owner counting.
|
|
|
Full Usage:
literalUnionName literals
Parameters:
ResolvedTypeLiteralLike list
Returns: Name<MeasureProduct<pascal, MeasureOne>>
|
|
Full Usage:
literalUnionTypePath literals
Parameters:
ResolvedTypeLiteralLike list
Returns: TypePath
|
|
Full Usage:
prerender ctx scope lazyResolvedType
Parameters:
GeneratorContext
scope : RenderScopeStore
lazyResolvedType : LazyResolvedType
Returns: TypeRefRender
|
|
Full Usage:
reRegisterStructuralLiterals ctx scope rootRt
Parameters:
GeneratorContext
scope : RenderScopeStore
rootRt : ResolvedType
|
Structural companion of `recordUnionMemberRefOwners` at the RENDER seam (see the cache-hit fall-through in `prerender`): walk a cached molecule's structural subtree and re-prerender every hoistable object literal against the CURRENT scope, restoring the TypeStore registration the first owner's descent performed. Nominal heads stop the walk (another owner's body); only lazies the first render already forced are re-entered, so this adds dictionary entries, not render work. The root itself is NOT re-prerendered — a homed literal's own cache-hit lands here and must only descend (self-re-entry would not terminate). Cycle-safe per walk by reference identity.
|
Full Usage:
recordUnionMemberRefOwners ctx rootRt
Parameters:
GeneratorContext
rootRt : ResolvedType
|
During the counting pre-pass, walk a top-level owner's ResolvedType graph (rooted at `rootRt`)
and record — against the current owner (`ctx.CurrentRefOwner`) — every hoistable object-literal
it REFERENCES (in any position: direct property/array element, union member, etc). This is a
STRUCTURAL walk over the ResolvedType graph, deliberately independent of `prerender`'s cache: a
shared literal's whole reference subtree (`ResizeArray
|
|
|
|
A readable base token for a shared object-literal's canonical name, derived from its member NAMES (properties/methods/accessors), like `literalUnionName` derives from a union's values. Member names alone do NOT uniquely identify a literal (two literals with identical property names but different property TYPES are distinct ResolvedTypes), so `markSharedLiterals` disambiguates collisions deterministically — this only supplies the human-readable stem.
|
Type extensions
| Type extension |
Description
|
|
|
Full Usage:
GeneratorContext.EmptyWithCustomisation(customisation)
Parameters:
Customisation -> Customisation
Returns: GeneratorContext
|
Extended Type:
|