Module lib/utils/assertions
Type aliases
MiniSchema
Mini
Schema<T>: { onError: (fn: RaiseFunc) => MiniSchema<T>; validate: any }
Type parameters
Type declaration
-
onError: (fn: RaiseFunc) => MiniSchema<T>
-
validate: function
- validate(obj: unknown): asserts obj is T
-
Parameters
Returns asserts obj is T
Functions
isType
- isType(obj: unknown, type: PojoType): boolean
-
Parameters
-
obj: unknown
-
type: PojoType
Returns boolean
minischema
-
Type parameters
Parameters
Returns true if obj matches the type