TinyBase logoTinyBase

ValuesSchema

{[valueId: Id]: ValueSchema}

A ValuesSchema comprises a JavaScript object describing each Value and its ValueSchema. It is provided to the setValuesSchema method.

Example

When applied to a Store, this ValuesSchema only allows one boolean Value called open, that defaults to false.

const valuesSchema: ValuesSchema = {
  open: {type: 'boolean', default: false},
};

Since

v3.0.0