On this page

class JavascriptGenerator extends Generator
Source Code: lib/javascript/JavascriptGenerator.js#L205
new JavascriptGenerator(): JavascriptGenerator
javascriptGenerator.generate(module, __namedParameters): Source | null
Source Code: lib/Generator.js#L111
Attributes
__namedParameters:GenerateContext
Returns:Source | null

Generates generated code for this runtime module.

javascriptGenerator.generateError(error, module, generateContext): Source | null
Source Code: lib/javascript/JavascriptGenerator.js#L433
Attributes
error:Error
generateContext:GenerateContext
Returns:Source | null

Generates fallback output for the provided error condition.

javascriptGenerator.getConcatenationBailoutReason(module, context): string | undefined
Source Code: lib/Generator.js#L126
Attributes

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

javascriptGenerator.getSize(module, type?): number
Source Code: lib/Generator.js#L97
Attributes
type:string
Returns:number

Returns the estimated size for the requested source type.

javascriptGenerator.getTypes(module): ReadonlySet<string>
Source Code: lib/Generator.js#L76
Attributes
Returns:ReadonlySet<string>

Returns the source types available for this module.

javascriptGenerator.getTypesDependOnIncomingConnections(): boolean
Source Code: lib/Generator.js#L85
Returns:boolean
javascriptGenerator.sourceBlock(module, block, templateContext, source, generateContext): void
Source Code: lib/javascript/JavascriptGenerator.js#L310
Attributes
module:Module
generateContext:GenerateContext

Processes the provided module.

javascriptGenerator.sourceDependency(dependency, source, templateContext, generateContext): void
Source Code: lib/javascript/JavascriptGenerator.js#L272
Attributes
dependency:Dependency
generateContext:GenerateContext

Processes the provided module.

javascriptGenerator.sourceModule(module, initFragments, source, generateContext): void
Source Code: lib/javascript/JavascriptGenerator.js#L339
Attributes
module:Module
initFragments:InitFragment<GenerateContext>[]
generateContext:GenerateContext

Processes the provided module.

javascriptGenerator.updateHash(hash, __namedParameters): void
Source Code: lib/Generator.js#L135
Attributes
hash:Hash
__namedParameters:UpdateHashContextGenerator

Updates the hash with the data contributed by this instance.

JavascriptGenerator.byType(map): ByTypeGenerator
Source Code: lib/Generator.js#L65
Attributes
map:{ [index: string]: Generator | undefined }

Returns generator by type.