Represents the generator runtime component.
new Generator(): GeneratorReturns:
Generatorgenerate(module, generateContext): Source | nullAttributes
module:
NormalModulemodule for which the code should be generated
generateContext:
GenerateContextcontext for generate
Returns:
Source | nullgenerated code
Generates generated code for this runtime module.
getConcatenationBailoutReason(module, context): string | undefinedAttributes
module:
NormalModulemodule for which the bailout reason should be determined
context
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:
NormalModulefresh module
Returns:
ReadonlySet<string>available types (do not mutate)
Returns the source types available for this module.
updateHash(hash, updateHashContextGenerator): voidAttributes
hash:
Hashhash that will be modified
updateHashContextGenerator:
UpdateHashContextGeneratorReturns:
voidUpdates the hash with the data contributed by this instance.
Attributes
Returns:
ByTypeGeneratorgenerator by type
Returns generator by type.