DICTIONARY()function

DICTIONARY(items: Schema<T>): DictionarySchema<T>
ParamType
itemsSchema<T>
Schema every entry value in the dictionary must conform to. required
Return
DictionarySchema<T>
Schema that validates a dictionary object whose entries all share the same value schema and have string keys.

Create a schema for a valid dictionary object with specified entry values.

Sugar factory for DictionarySchema.

Examples

DICTIONARY(NUMBER) // DictionarySchema<number>