Class: AskEnumField<V>
Defined in: packages/core/src/core/elicitation/types.ts:154
Enum field descriptor — ask.enum(['a', 'b'] as const, 'Choose one')
Extends
AskField<V>
Type Parameters
| Type Parameter | Description |
|---|---|
V extends string | Literal union type inferred from the values array |
Constructors
Constructor
ts
new AskEnumField<V>(values, description): AskEnumField<V>;Defined in: packages/core/src/core/elicitation/types.ts:158
Parameters
| Parameter | Type |
|---|---|
values | readonly [V, V] |
description | string | undefined |
Returns
AskEnumField<V>
Overrides
ts
AskField<V>.constructorProperties
__type
ts
readonly __type: V;Defined in: packages/core/src/core/elicitation/types.ts:44
Phantom brand for type inference — never accessed at runtime
Inherited from
Methods
default()
ts
default(value): this;Defined in: packages/core/src/core/elicitation/types.ts:61
Set a default value for this field.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | V | Default value shown pre-filled in the client form |
Returns
this
this for chaining
Inherited from
describe()
ts
describe(desc): this;Defined in: packages/core/src/core/elicitation/types.ts:72
Set or override the field description.
Parameters
| Parameter | Type | Description |
|---|---|---|
desc | string | Human-readable label/description |
Returns
this
this for chaining