Represents the generator runtime component.
new Generator(): GeneratorReturns:
<Generator>generate(module, generateContext): Source | nullAttributes
module:
<NormalModule>module for which the code should be generated
generateContext:
<GenerateContext>context for generate
Generates generated code for this runtime module.
getConcatenationBailoutReason(module, context): string | undefinedAttributes
module:
<NormalModule>module for which the bailout reason should be determined
context
Returns:
<string>
|
<undefined>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?): numberAttributes
Returns the estimated size for the requested source type.
getTypes(module): ReadonlySet<string>Attributes
module:
<NormalModule>fresh module
Returns:
{ReadonlySet
} available types (do not mutate)
Returns the source types available for this module.
updateHash(hash, updateHashContextGenerator): voidAttributes
hash:
<Hash>hash that will be modified
updateHashContextGenerator:
<UpdateHashContextGenerator>Returns:
<void>Updates the hash with the data contributed by this instance.
map{{ [index: string]: Generator | undefined }} map of types- Returns:
<ByTypeGenerator>generator by type
Returns generator by type.