MCPcopy
hub / github.com/jquense/yup / ISchema

Interface ISchema

src/types.ts:15–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13export type { AnyObject, AnySchema };
14
15export interface ISchema<T, C = any, F extends Flags = any, D = any> {
16 __flags: F;
17 __context: C;
18 __outputType: T;
19 __default: D;
20
21 cast(value: any, options?: CastOptions<C>): T;
22 cast(value: any, options: CastOptionalityOptions<C>): T | null | undefined;
23
24 validate(value: any, options?: ValidateOptions<C>): Promise<T>;
25
26 asNestedTest(config: NestedTestConfig): Test;
27
28 describe(options?: ResolveOptions<C>): SchemaFieldDescription;
29 resolve(options: ResolveOptions<C>): ISchema<T, C, F>;
30}
31
32export type InferType<T extends ISchema<any, any>> = T['__outputType'];
33

Callers 34

runkit-example.jsFile · 0.65
yup.jsFile · 0.65
bool.tsFile · 0.65
mixed.tsFile · 0.65
date.tsFile · 0.65
array.tsFile · 0.65
tuple.tsFile · 0.65
castAndShouldFailFunction · 0.65
yup.jsFile · 0.65
bool.tsFile · 0.65
mixed.tsFile · 0.65
lazy.tsFile · 0.65

Implementers 1

Lazysrc/Lazy.ts

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…