On this page

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

generateError(error, module, generateContext): Source | null
Attributes
error:<Error>
generateContext:<GenerateContext>
Returns:<Source> | <null>

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

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

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

sourceBlock(module, block, initFragments, source, generateContext): void
Attributes
module:<Module>
block:
{DependenciesBlock}
initFragments:
{InitFragment< GenerateContext >[]}
generateContext:<GenerateContext>
Returns:
{void}

sourceDependency(module, dependency, initFragments, source, generateContext): void
Attributes
module:<Module>
dependency:<Dependency>
initFragments:
{InitFragment< GenerateContext >[]}
generateContext:<GenerateContext>
Returns:
{void}

sourceModule(module, initFragments, source, generateContext): void
Attributes
module:<Module>
initFragments:
{InitFragment< GenerateContext >[]}
generateContext:<GenerateContext>
Returns:
{void}

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

Attributes
map of types
Returns:
{ByTypeGenerator} generator by type