Home > @websublime/schema

schema package

Classes

ClassDescription
ArraySchemaTypeArray model type validation
BaseSchemaTypeBase type model validation
BooleanSchemaTypeBoolean type validation
DateSchemaTypeDate model type validation
ErrorModel
NumberSchemaTypeNumber model type validation
ObjectSchemaTypeObject model type validation
StringSchemaTypeString model type validation

Enumerations

EnumerationDescription
schemaType

Functions

FunctionDescription
ArrayType(items, errorMessage)Creates instance ObjectType
BaseType(st)Creates instance MixedType
BooleanType(errorMessage)Creates instance BooleanType
DateType(errorMessage)Creates instance DateType
NumberType(errorMessage)Creates instance NumberType
ObjectType(shape, errorMessage)Creates instance ObjectType
StringType(errorMessage)Creates instance StringType

Interfaces

InterfaceDescription
CheckResultResult from schema validation check.
ModelModel Interface Can implement a toJSON method to use with JSON.stringify
RuleRule signature for validation

Variables

VariableDescription
errorMessages

Type Aliases

Type AliasDescription
InferSchemaTypeInfer which schema type is base on the native type
MaybeOne of the values
PropertiesProperties of ObjectSchemaType
validationFnTypeValidation funciton type