On this page

Represents the generator runtime component.

new Generator(): Generator
Returns:<Generator>
generate(module, generateContext): Source | null
Attributes
module for which the code should be generated
generateContext:<GenerateContext>
context for generate
Returns:<Source> | <null>
generated code

Generates generated code for this runtime module.


getConcatenationBailoutReason(module, context): string | undefined
Attributes
module for which the bailout reason should be determined
reason why this module can't be concatenated, undefined when it can be concatenated

Returns the reason this module cannot be concatenated, when one exists.


getSize(module, type?): number
Attributes
the module
source type
Returns:<number>
estimate size of the module

Returns the estimated size for the requested source type.


getTypes(module): ReadonlySet
Attributes
fresh module
Returns:
<ReadonlySet> < <string> > available types (do not mutate)

Returns the source types available for this module.


updateHash(hash, updateHashContextGenerator): void
Attributes
hash:<Hash>
hash that will be modified
updateHashContextGenerator:<UpdateHashContextGenerator>
Returns:<void>

Updates the hash with the data contributed by this instance.


Attributes
map of types
generator by type

Returns generator by type.