Skip to content

@pumpkin-plugins/config API / fields / int

Function: int() ​

Call Signature ​

int(options): Field<number>

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

A whole-number setting, optionally limited to a range.

Parameters ​

options ​

BaseOptions<number> & object

Description, optional bounds and, unless the setting is optional, its default.

Returns ​

Field<number>

The field.

Throws ​

If a bound, default or example is not a safe integer, the range is inverted, or the default or example falls outside the range.

Call Signature ​

int(options): Field<number | undefined>

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

A whole-number setting, optionally limited to a range.

Parameters ​

options ​

BaseOptions<number> & object

Description, optional bounds and, unless the setting is optional, its default.

Returns ​

Field<number | undefined>

The field.

Throws ​

If a bound, default or example is not a safe integer, the range is inverted, or the default or example falls outside the range.

pumpkin-plugins documentation