On this page

Source Code: lib/InitFragment.js#L36

Represents InitFragment.

Extended by ModuleExternalInitFragment.

new InitFragment(content, stage, position, key?, endContent?): InitFragment<GenerateContext>
Source Code: lib/InitFragment.js#L45
Attributes
content:string | Source | undefined
stage:number
position:number
key:string
endContent:string | Source

Creates an instance of InitFragment.

Source Code: lib/InitFragment.js#L47
Type:string | Source
Source Code: lib/InitFragment.js#L55
Type:string | Source
Source Code: lib/InitFragment.js#L53
Type:string
Source Code: lib/InitFragment.js#L51
Type:number
Source Code: lib/InitFragment.js#L49
Type:number
Type:number
Type:number
Type:number
Type:number
Type:number
Type:number
Type:number
initFragment.deserialize(context): void
Source Code: lib/InitFragment.js#L186
Attributes

Restores this instance from the provided deserializer context.

initFragment.getContent(context): string | Source | undefined
Source Code: lib/InitFragment.js#L63
Attributes

Returns the source code that will be included as initialization code.

initFragment.getEndContent(context): string | Source | undefined
Source Code: lib/InitFragment.js#L72
Attributes

Returns the source code that will be included at the end of the module.

initFragment.serialize(context): void
Source Code: lib/InitFragment.js#L172
Attributes

Serializes this instance into the provided serializer context.

InitFragment.addToSource(source, initFragments, context): Source
Source Code: lib/InitFragment.js#L84
Attributes
source:Source
initFragments:MaybeMergeableInitFragment<Context>[]
context:Context
Returns:Source

Adds the provided source to the init fragment.