Stores code generation results keyed by module and runtime so later stages can retrieve emitted sources, metadata, and derived hashes.
new CodeGenerationResults(): CodeGenerationResults
CodeGenerationResultsadd
add(module, runtime, result): void
Stores a code generation result for a module/runtime pair, creating the per-module runtime map when needed.
get
get(module, runtime): CodeGenerationResult
Returns the code generation result for a module/runtime pair, rejecting ambiguous lookups where no unique runtime-independent result exists.
getData(module, runtime, key): any
Returns an arbitrary metadata entry recorded during code generation.
getHash(module, runtime): string
Returns a stable hash for the generated sources and runtime requirements, computing and caching it on first access.
getRuntimeRequirements(module, runtime): ReadonlySet<string> | null
Returns the runtime requirements captured during code generation for the requested module/runtime pair.
getSource(module, runtime, sourceType): Source
Returns a generated source of the requested source type from a stored code generation result.
has
has(module, runtime): boolean
Reports whether a module has a stored result for the requested runtime, or a single unambiguous result when no runtime is specified.