Skip to content

@pumpkin-plugins/config API / schema / table

Function: table() ​

table<F>(options): TableNode<F>

Defined in: tools/config/src/schema.ts:58

Declares a table of entries with optional settings. Initial entries use field defaults for omitted fields; optional fields without defaults stay absent.

Type Parameters ​

F ​

F extends Fields

Parameters ​

options ​

Description, entry names, an example key and the fields every entry may have.

defaults? ​

TableValues<F>

description ​

string

entryName ​

string

exampleKey ​

string

fields ​

F

Returns ​

TableNode<F>

The table with initial entries completed and field values in their parsed form.

Throws ​

If an initial entry has an undeclared field or a provided or default value fails validation.

pumpkin-plugins documentation