On this page

new CodeGenerationResults(): CodeGenerationResults
Attributes
add(module, runtime, result): void
Attributes
module:Module
runtime:RuntimeSpec
Returns:void

Stores a code generation result for a module/runtime pair, creating the per-module runtime map when needed.


get(module, runtime): CodeGenerationResult
Attributes

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
Attributes
module:Module
runtime:RuntimeSpec
key:string
Returns:any

Returns an arbitrary metadata entry recorded during code generation.


getHash(module, runtime): string
Attributes
module:Module
runtime:RuntimeSpec
Returns: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
Attributes
module:Module
runtime:RuntimeSpec
Returns:ReadonlySet<string> | null

Returns the runtime requirements captured during code generation for the requested module/runtime pair.


getSource(module, runtime, sourceType): Source
Attributes
module:Module
runtime:RuntimeSpec
sourceType:string
Returns:Source

Returns a generated source of the requested source type from a stored code generation result.


has(module, runtime): boolean
Attributes
module:Module
runtime:RuntimeSpec
Returns:boolean

Reports whether a module has a stored result for the requested runtime, or a single unambiguous result when no runtime is specified.