Represents the generator runtime component.
new Generator(): Generator
Returns:
Generatorgenerate(module, generateContext): Source | null
Attributes
module:
NormalModulemodule for which the code should be generated
generateContext:
GenerateContextcontext for generate
Generates generated code for this runtime module.
getConcatenationBailoutReason(module, context): string | undefined
Attributes
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?): number
Attributes
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.
getTypesDependOnIncomingConnections(): boolean
Returns:
booleanwhether getTypes() depends on the module's incoming connections
updateHash(hash, updateHashContextGenerator): void
Attributes
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.