Represents InitFragment.
new InitFragment(content, stage, position, key?, endContent?): InitFragment<GenerateContext>Attributes
stage:
numbercategory of initialization code (contribute to order)
position:
numberposition in the category (contribute to order)
key:
stringunique key to avoid emitting the same initialization code twice
Returns:
InitFragment<GenerateContext>Creates an instance of InitFragment.
Attributes
deserialize(context): voidAttributes
context:
ObjectDeserializerContextcontext
Returns:
voidRestores this instance from the provided deserializer context.
getContent(context): string | Source | undefinedAttributes
context:
GenerateContextcontext
Returns the source code that will be included as initialization code.
getEndContent(context): string | Source | undefinedAttributes
context:
GenerateContextcontext
Returns the source code that will be included at the end of the module.
serialize(context): voidAttributes
context:
ObjectSerializerContextcontext
Returns:
voidSerializes this instance into the provided serializer context.
Attributes
source:
Sourcesources
initFragments:
MaybeMergeableInitFragment<Context>[]init fragments
context:
Contextcontext
Returns:
Sourcesource
Adds the provided source to the init fragment.