Skip to content

@pumpkin-plugins/config API / fields / field

Function: field() ​

field<T>(spec): Field<T | undefined>

Defined in: tools/config/src/fields.ts:49

Builds a field from its pieces. Prefer bool, int and str.

Type Parameters ​

T ​

T

Parameters ​

spec ​

default ​

T | undefined

description ​

string

example ​

T

expected ​

string

format ​

(value) => string

migrateFrom? ​

readonly string[]

parse ​

(raw) => Parsed<T>

type ​

FieldType

Returns ​

Field<T | undefined>

Pumpkin Plugins documentation