Skip to content

PromptScript API


Interface: BlockBody

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

Uniform canonical body shared by every block type.

Extends

Properties

entries

readonly entries: readonly BlockEntry[]

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


legacyProjection?

readonly optional legacyProjection?: "TextContent" | "ObjectContent" | "ArrayContent" | "MixedContent"

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

Original legacy projection, retained across immutable updates


legacyText?

readonly optional legacyText?: object

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

Exact resolved text projection when entries retain multiple source fragments

loc

readonly loc: object

Source location

loc.column

readonly column: number

Column number (1-indexed)

loc.file

readonly file: string

File path

loc.line

readonly line: number

Line number (1-indexed)

loc.offset?

readonly optional offset?: number

Byte offset from start of file

type

readonly type: "TextContent"

Node type discriminator

value

readonly value: string

Text value (without delimiters)


loc

readonly loc: object

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

column

readonly column: number

Column number (1-indexed)

file

readonly file: string

File path

line

readonly line: number

Line number (1-indexed)

offset?

readonly optional offset?: number

Byte offset from start of file

Inherited from

CanonicalNode.loc


shape

readonly shape: "object" | "array" | "text" | "mixed"

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


type

readonly type: "BlockBody"

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

Overrides

CanonicalNode.type