AxFluentFieldType Generated TypeScript API reference. typescript api api/reference build/apidocs/Class.AxFluentFieldType.md class AxFluentFieldType

AxFluentFieldType

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L284

Type Parameters

Type ParameterDefault type
TType extends AxFieldType["type"]AxFieldType["type"]
TIsArray extends booleanfalse
TOptions extends readonly string[] | undefinedundefined
TIsOptional extends booleanfalse
TIsInternal extends booleanfalse
TFields extends | Record<string, | AxFluentFieldInfo | AxFluentFieldType> | undefinedundefined
TIsCached extends booleanfalse

Implements

Constructors

Constructor

TypeScript
new AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>(fieldType: object): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L313

Parameters

ParameterType
fieldType{ description?: string; fields?: TFields; format?: string; isArray: TIsArray; isCached: TIsCached; isInternal: TIsInternal; isOptional: TIsOptional; itemDescription?: string; maximum?: number; maxLength?: number; minimum?: number; minLength?: number; options?: TOptions; pattern?: string; patternDescription?: string; type: TType; }
fieldType.description?string
fieldType.fields?TFields
fieldType.format?string
fieldType.isArrayTIsArray
fieldType.isCachedTIsCached
fieldType.isInternalTIsInternal
fieldType.isOptionalTIsOptional
fieldType.itemDescription?string
fieldType.maximum?number
fieldType.maxLength?number
fieldType.minimum?number
fieldType.minLength?number
fieldType.options?TOptions
fieldType.pattern?string
fieldType.patternDescription?string
fieldType.typeTType

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>

Properties

PropertyModifierType
description?readonlystring
fields?readonlyany
format?readonlystring
isArrayreadonlyTIsArray
isCachedreadonlyTIsCached
isInternalreadonlyTIsInternal
isOptionalreadonlyTIsOptional
itemDescription?readonlystring
maximum?readonlynumber
maxLength?readonlynumber
minimum?readonlynumber
minLength?readonlynumber
options?readonlyTOptions
pattern?readonlystring
patternDescription?readonlystring
typereadonlyTType

Accessors

~standard

Get Signature

TypeScript
get ~standard(): Props<unknown, unknown>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L589

Standard Schema v1 surface — lets ax fields flow through any library that accepts StandardSchemaV1 (tRPC, TanStack Form, Vercel AI SDK, etc.).

Returns

Props<unknown, unknown>

Methods

array()

TypeScript
array(desc?: string): AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L364

Parameters

ParameterType
desc?string

Returns

AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>


cache()

TypeScript
cache(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, true>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L403

Mark this input field for caching. When contextCache is enabled, cached fields are rendered in a separate user message with cache: true, allowing them to be cached by the LLM provider.

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, true>


date()

TypeScript
date(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L546

Set date format validation for strings

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>


datetime()

TypeScript
datetime(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L567

Set datetime format validation for strings

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>


email()

TypeScript
email(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L477

Set email format validation for strings

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>


internal()

TypeScript
internal(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L383

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true, TFields, TIsCached>


max()

TypeScript
max(value: number): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L449

Set maximum value for numbers or maximum length for strings

Parameters

ParameterType
valuenumber

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>


min()

TypeScript
min(value: number): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L421

Set minimum value for numbers or minimum length for strings

Parameters

ParameterType
valuenumber

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>


optional()

TypeScript
optional(): AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L349

Returns

AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal, TFields, TIsCached>


regex()

TypeScript
regex(pattern: string, description: string): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L521

Set regex pattern validation for strings

Parameters

ParameterTypeDescription
patternstringRegular expression pattern to match
descriptionstringHuman-readable description of what the pattern validates (e.g., “Must be a valid username with only lowercase letters, numbers, and underscores”)

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>


url()

TypeScript
url(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/dsp/sig.ts#L498

Set URL/URI format validation for strings

Returns

AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, TIsInternal, TFields, TIsCached>

Docs