Skip to content

defaultKinds ​

The built-in kinds, by name: string, number, boolean, date, array, file, object and none.

ts
const kinds = defaultKinds

Explanation ​

Each says what counts as empty, and adds a required check where emptiness isn't enough:

KindEmptyRequired
stringundefined, null or ''not empty
numberundefined, null, '' or NaNnot empty
booleanundefined or nulltrue, like a ticked box
dateundefined, null or ''not empty
arrayundefined, null or []at least one item
fileundefined or nullnot empty
objectundefined or nullnot empty
nonealways: a display element has no valuenever checked

Your own kinds merge over them by name, with the kinds option.

Types ​