Skip to content

PromptScript API


Interface: ExtendBlock

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

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:316

Ordered compatibility metadata retained for canonical consumers


content

content: BlockContent

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

Content to merge


loc

loc: SourceLocation

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

Source location

Inherited from

BaseNode.loc


replacements?

optional replacements?: ReplaceModifier[]

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

Fields whose complete prior values must be replaced


targetPath

targetPath: string

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

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


type

readonly type: "ExtendBlock"

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

Node type discriminator

Overrides

BaseNode.type