Skip to content

TypeExpressionValueNode

PromptScript API


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

Canonical type expression value.

Extends

Properties

expression

readonly expression: object

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

constraints?

readonly optional constraints?: object

Constraints

constraints.max?

readonly optional max?: number

constraints.min?

readonly optional min?: number

constraints.options?

readonly optional options?: readonly (PrimitiveValue | { readonly type: “TypeExpression”; readonly kind: “string” | “number” | “boolean” | “list” | “enum” | “range”; readonly params?: readonly (PrimitiveValue | … | { readonly type: “TextContent”; readonly value: string; readonly loc: { …; }; } | readonly (PrimitiveValue | … 4 more … | { …; })[] | { …; } | { … | { loc: { column: number; file: string; line: number; offset?: number; }; type: "TextContent"; value: string; } | readonly (PrimitiveValue | { readonly type: “TypeExpression”; readonly kind: “string” | “number” | “boolean” | “list” | “enum” | “range”; readonly params?: readonly (PrimitiveValue | … 4 more … | { …; })[] | undefined; readonly constraints?: { …; } | undefined; readonly loc: { …; }; } | { …; } | readonly… | {[key: string]: PrimitiveValue | { readonly type: “TypeExpression”; readonly kind: “string” | “number” | “boolean” | “list” | “enum” | “range”; readonly params?: readonly (PrimitiveValue | … 4 more … | { …; })[] | undefined; readonly constraints?: { …; } | undefined; readonly loc: { …; }; } | { …; } | readonly (Primitiv…; } | { loc: { column: number; file: string; line: number; offset?: number; }; name: string; type: "TemplateExpression"; })[]

kind

readonly kind: "string" | "number" | "boolean" | "list" | "enum" | "range"

Type kind

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

params?

readonly optional params?: readonly (PrimitiveValue | { readonly type: “TypeExpression”; readonly kind: “string” | “number” | “boolean” | “list” | “enum” | “range”; readonly params?: readonly (PrimitiveValue | … | { readonly type: “TextContent”; readonly value: string; readonly loc: { …; }; } | readonly (PrimitiveValue | … 4 more … | { …; })[] | { …; } | { … | { loc: { column: number; file: string; line: number; offset?: number; }; type: "TextContent"; value: string; } | readonly (PrimitiveValue | { readonly type: “TypeExpression”; readonly kind: “string” | “number” | “boolean” | “list” | “enum” | “range”; readonly params?: readonly (PrimitiveValue | … 4 more … | { …; })[] | undefined; readonly constraints?: { …; } | undefined; readonly loc: { …; }; } | { …; } | readonly… | {[key: string]: PrimitiveValue | { readonly type: “TypeExpression”; readonly kind: “string” | “number” | “boolean” | “list” | “enum” | “range”; readonly params?: readonly (PrimitiveValue | … 4 more … | { …; })[] | undefined; readonly constraints?: { …; } | undefined; readonly loc: { …; }; } | { …; } | readonly (Primitiv…; } | { loc: { column: number; file: string; line: number; offset?: number; }; name: string; type: "TemplateExpression"; })[]

Type parameters

type

readonly type: "TypeExpression"

Node type discriminator


loc

readonly loc: object

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

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


type

readonly type: "TypeExpressionValueNode"

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

Overrides

CanonicalNode.type