Skip to content

ExtendBlock

PromptScript API


Defined in: core/src/types/ast.ts:341

Extension block that modifies an existing block.

Example

@extend identity {
"""
Additional context.
"""
}
@extend standards.code {
frameworks: [react]
}

Extends

Properties

canonicalBody?

optional canonicalBody?: BlockBody

Defined in: core/src/types/ast.ts:348

Ordered compatibility metadata retained for canonical consumers


content

content: BlockContent

Defined in: core/src/types/ast.ts:346

Content to merge


loc

loc: SourceLocation

Defined in: core/src/types/ast.ts:16

Source location

Inherited from

BaseNode.loc


replacements?

optional replacements?: ReplaceModifier[]

Defined in: core/src/types/ast.ts:350

Fields whose complete prior values must be replaced


targetPath

targetPath: string

Defined in: core/src/types/ast.ts:344

Dot-separated path to target (e.g., “standards.code”)


type

readonly type: "ExtendBlock"

Defined in: core/src/types/ast.ts:342

Node type discriminator

Overrides

BaseNode.type