Skip to content

S

src/S.resi
type never

src/S.resi:4:1


src/S.resi
type t

src/S.resi:7:3


src/S.resi
let empty: t

src/S.resi:9:3


src/S.resi
let dynamic: t

src/S.resi:10:3


src/S.resi
let toString: t => string

src/S.resi:12:3


src/S.resi
let toArray: t => array<string>

src/S.resi:14:3


src/S.resi
let fromArray: array<string> => t

src/S.resi:16:3


src/S.resi
let fromLocation: string => t

src/S.resi:18:3


src/S.resi
let concat: (t, t) => t

src/S.resi:20:3


src/S.resi:6:8


src/S.resi
type numberFormat = @as("int32") Int32 | @as("port") Port

src/S.resi:23:1


src/S.resi
type stringFormat = @as("json") JSON

src/S.resi:24:1


src/S.resi
type format =
| @as("int32") Int32
| @as("port") Port
| @as("json") JSON

src/S.resi:26:1


src/S.resi
@unboxed
type additionalItemsMode =
| @as("strip") Strip
| @as("strict") Strict

src/S.resi:29:1


src/S.resi
type tag =
| @as("string") String
| @as("number") Number
| @as("bigint") BigInt
| @as("boolean") Boolean
| @as("symbol") Symbol
| @as("null") Null
| @as("undefined") Undefined
| @as("nan") NaN
| @as("function") Function
| @as("instance") Instance
| @as("array") Array
| @as("object") Object
| @as("union") Union
| @as("never") Never
| @as("unknown") Unknown
| @as("ref") Ref

src/S.resi:31:1


src/S.resi
type t<'value> =
| Never({
name?: string,
title?: string,
description?: string,
deprecated?: bool,
})
| Unknown({
name?: string,
description?: string,
title?: string,
deprecated?: bool,
examples?: array<unknown>,
default?: unknown,
})
| String({
const?: string,
format?: stringFormat,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<string>,
default?: string,
})
| Number({
const?: float,
format?: numberFormat,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<float>,
default?: float,
})
| BigInt({
const?: bigint,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<bigint>,
default?: bigint,
})
| Boolean({
const?: bool,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<bool>,
default?: bool,
})
| Symbol({
const?: Js.Types.symbol,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<Js.Types.symbol>,
default?: Js.Types.symbol,
})
| Null({
const: Js.Types.null_val,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
})
| Undefined({
const: unit,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
})
| NaN({
const: float,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
})
| Function({
const?: Js.Types.function_val,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<Js.Types.function_val>,
default?: Js.Types.function_val,
})
| Instance({
class: unknown,
const?: Js.Types.obj_val,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<Js.Types.obj_val>,
default?: Js.Types.obj_val,
})
| Array({
items: array<item>,
additionalItems: additionalItems,
unnest?: bool,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<array<unknown>>,
default?: array<unknown>,
})
| Object({
items: array<item>,
properties: dict<t<unknown>>,
additionalItems: additionalItems,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<dict<unknown>>,
default?: dict<unknown>,
})
| Union({
anyOf: array<t<unknown>>,
has: has,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<unknown>,
default?: unknown,
})
| Ref({ref: string})

src/S.resi:50:1


src/S.resi
type schema<'a> = t<'a>

src/S.resi:195:1


src/S.resi
type meta<'value> = {
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<'value>,
}

src/S.resi:196:1


src/S.resi
type untagged = private {
tag: tag,
ref?: string,
defs?: dict<t<unknown>>,
const?: unknown,
class?: unknown,
format?: format,
name?: string,
title?: string,
description?: string,
deprecated?: bool,
examples?: array<unknown>,
default?: unknown,
unnest?: bool,
noValidation?: bool,
items?: array<item>,
properties?: dict<t<unknown>>,
additionalItems?: additionalItems,
anyOf?: array<t<unknown>>,
has?: dict<bool>,
to?: t<unknown>,
}

src/S.resi:203:1


src/S.resi
@unboxed
type additionalItems =
| @as("strip") Strip
| @as("strict") Strict
| Schema(t<unknown>)

src/S.resi:228:1


src/S.resi
type item = {schema: t<unknown>, location: string}

src/S.resi:229:1


src/S.resi
type has = {
string?: bool,
number?: bool,
never?: bool,
unknown?: bool,
bigint?: bool,
boolean?: bool,
symbol?: bool,
null?: bool,
undefined?: bool,
nan?: bool,
function?: bool,
instance?: bool,
array?: bool,
object?: bool,
}

src/S.resi:233:1


src/S.resi
type error = private {
message: string,
reason: string,
path: Path.t,
code: errorCode,
flag: flag,
}

src/S.resi:249:1


src/S.resi
type errorCode =
| OperationFailed(string)
| InvalidOperation({description: string})
| InvalidType({
expected: schema<unknown>,
received: unknown,
unionErrors?: array<error>,
})
| UnsupportedTransformation({
from: schema<unknown>,
to: schema<unknown>,
})
| ExcessField(string)
| UnexpectedAsync
| InvalidJsonSchema(schema<unknown>)

src/S.resi:256:1


src/S.resi
type flag

src/S.resi:264:1


src/S.resi
type s<'value> = {
schema: t<'value>,
fail: 'a. (string, ~path: Path.t=?) => 'a,
}

src/S.resi:268:1


src/S.resi
let none: flag

src/S.resi:274:3


src/S.resi
let typeValidation: flag

src/S.resi:275:3


src/S.resi
let async: flag

src/S.resi:276:3


src/S.resi
let assertOutput: flag

src/S.resi:277:3


src/S.resi
let jsonableOutput: flag

src/S.resi:278:3


src/S.resi
let jsonStringOutput: flag

src/S.resi:279:3


src/S.resi
let reverse: flag

src/S.resi:280:3


src/S.resi
let with: (flag, flag) => flag

src/S.resi:282:3


src/S.resi
let has: (flag, flag) => bool

src/S.resi:283:3


src/S.resi:273:8


src/S.resi
let never: t<never>

src/S.resi:286:1


src/S.resi
let unknown: t<unknown>

src/S.resi:287:1


src/S.resi
let unit: t<unit>

src/S.resi:288:1


src/S.resi
let nullAsUnit: t<unit>

src/S.resi:289:1


src/S.resi
let string: t<string>

src/S.resi:290:1


src/S.resi
let bool: t<bool>

src/S.resi:291:1


src/S.resi
let int: t<int>

src/S.resi:292:1


src/S.resi
let float: t<float>

src/S.resi:293:1


src/S.resi
let bigint: t<bigint>

src/S.resi:294:1


src/S.resi
let symbol: t<Js.Types.symbol>

src/S.resi:295:1


src/S.resi
let json: t<Js.Json.t>

src/S.resi:297:1


src/S.resi
let enableJson: unit => unit

src/S.resi:298:1


src/S.resi
let jsonString: t<string>

src/S.resi:300:1


src/S.resi
let jsonStringWithSpace: int => t<string>

src/S.resi:301:1


src/S.resi
let enableJsonString: unit => unit

src/S.resi:302:1


src/S.resi
let literal: 'value => t<'value>

src/S.resi:304:1


src/S.resi
let array: t<'value> => t<array<'value>>

src/S.resi:305:1


src/S.resi
let unnest: t<'value> => t<array<'value>>

src/S.resi:306:1


src/S.resi
let list: t<'value> => t<list<'value>>

src/S.resi:307:1


src/S.resi
let instance: unknown => t<unknown>

src/S.resi:308:1


src/S.resi
let dict: t<'value> => t<dict<'value>>

src/S.resi:309:1


src/S.resi
let option: t<'value> => t<option<'value>>

src/S.resi:310:1


src/S.resi
let null: t<'value> => t<option<'value>>

src/S.resi:311:1


src/S.resi
let nullable: t<'value> => t<Js.nullable<'value>>

src/S.resi:312:1


src/S.resi
let nullableAsOption: t<'value> => t<option<'value>>

src/S.resi:313:1


src/S.resi
let union: array<t<'value>> => t<'value>

src/S.resi:314:1


src/S.resi
let enum: array<'value> => t<'value>

src/S.resi:315:1


src/S.resi
let meta: (t<'value>, meta<'value>) => t<'value>

src/S.resi:317:1


src/S.resi
type transformDefinition<'input, 'output> = {
parser?: 'input => 'output,
asyncParser?: 'input => promise<'output>,
serializer?: 'output => 'input,
}

src/S.resi:319:1


src/S.resi
let transform: (
t<'input>,
s<'output> => transformDefinition<'input, 'output>,
) => t<'output>

src/S.resi:327:1


src/S.resi
let refine: (t<'value>, s<'value> => 'value => unit) => t<'value>

src/S.resi:329:1


src/S.resi
let shape: (t<'value>, 'value => 'shape) => t<'shape>

src/S.resi:331:1


src/S.resi
let to: (t<'from>, t<'to>) => t<'to>

src/S.resi:333:1


src/S.resi
type input<'value, 'computed> =
| @as("Output") Value: input<'value, 'value>
| @as("Input") Unknown: input<'value, unknown>
| Any: input<'value, 'any>
| Json: input<'value, Js.Json.t>
| JsonString: input<'value, string>

src/S.resi:335:1


src/S.resi
type output<'value, 'computed> =
| @as("Output") Value: output<'value, 'value>
| @as("Input") Unknown: output<'value, unknown>
| Assert: output<'value, unit>
| Json: output<'value, Js.Json.t>
| JsonString: output<'value, string>

src/S.resi:341:1


src/S.resi
type mode<'output, 'computed> =
| Sync: mode<'output, 'output>
| Async: mode<'output, promise<'output>>

src/S.resi:347:1


src/S.resi
let compile: (
t<'value>,
~input: input<'value, 'input>,
~output: output<'value, 'transformedOutput>,
~mode: mode<'transformedOutput, 'output>,
~typeValidation: bool=?,
) => 'input => 'output

src/S.resi:351:1


src/S.resi
let parseOrThrow: ('any, t<'value>) => 'value

src/S.resi:359:1


src/S.resi
let parseJsonOrThrow: (Js.Json.t, t<'value>) => 'value

src/S.resi:360:1


src/S.resi
let parseJsonStringOrThrow: (string, t<'value>) => 'value

src/S.resi:361:1


src/S.resi
let parseAsyncOrThrow: ('any, t<'value>) => promise<'value>

src/S.resi:362:1


src/S.resi
let convertOrThrow: ('any, t<'value>) => 'value

src/S.resi:364:1


src/S.resi
let convertToJsonOrThrow: ('any, t<'value>) => Js.Json.t

src/S.resi:365:1


src/S.resi
let convertToJsonStringOrThrow: ('any, t<'value>) => string

src/S.resi:366:1


src/S.resi
let convertAsyncOrThrow: ('any, t<'value>) => promise<'value>

src/S.resi:367:1


src/S.resi
let reverseConvertOrThrow: ('value, t<'value>) => unknown

src/S.resi:369:1


src/S.resi
let reverseConvertToJsonOrThrow: ('value, t<'value>) => Js.Json.t

src/S.resi:370:1


src/S.resi
let reverseConvertToJsonStringOrThrow: ('value, t<'value>, ~space: int=?) => string

src/S.resi:371:1


src/S.resi
let assertOrThrow: ('any, t<'value>) => unit

src/S.resi:373:1


src/S.resi
let isAsync: t<'value> => bool

src/S.resi:375:1


src/S.resi
let recursive: (string, t<'value> => t<'value>) => t<'value>

src/S.resi:377:1


src/S.resi
let noValidation: (t<'value>, bool) => t<'value>

src/S.resi:379:1


src/S.resi
let toExpression: t<'value> => string

src/S.resi:381:1


src/S.resi
let castToUnknown: t<'value> => t<unknown>

src/S.resi:383:1


src/S.resi
let castToAny: t<'value> => t<'any>

src/S.resi:384:1


src/S.resi
let untag: t<'value> => untagged

src/S.resi:385:1


src/S.resi
type s = {matches: 'value. t<'value> => 'value}

src/S.resi:388:3


src/S.resi:387:8


src/S.resi
let schema: (Schema.s => 'value) => t<'value>

src/S.resi:390:1


src/S.resi
type s = {
field: 'value. (string, t<'value>) => 'value,
fieldOr: 'value. (string, t<'value>, 'value) => 'value,
tag: 'value. (string, 'value) => unit,
nested: string => s,
flatten: 'value. t<'value> => 'value,
}

src/S.resi:393:3


src/S.resi:392:8


src/S.resi
let object: (Object.s => 'value) => t<'value>

src/S.resi:402:1


src/S.resi
let strip: t<'value> => t<'value>

src/S.resi:404:1


src/S.resi
let deepStrip: t<'value> => t<'value>

src/S.resi:405:1


src/S.resi
let strict: t<'value> => t<'value>

src/S.resi:406:1


src/S.resi
let deepStrict: t<'value> => t<'value>

src/S.resi:407:1


src/S.resi
type s = {
item: 'value. (int, t<'value>) => 'value,
tag: 'value. (int, 'value) => unit,
}

src/S.resi:410:3


src/S.resi:409:8


src/S.resi
let tuple: (Tuple.s => 'value) => t<'value>

src/S.resi:416:1


src/S.resi
let tuple1: t<'value> => t<'value>

src/S.resi:417:1


src/S.resi
let tuple2: (t<'v1>, t<'v2>) => t<('v1, 'v2)>

src/S.resi:418:1


src/S.resi
let tuple3: (t<'v1>, t<'v2>, t<'v3>) => t<('v1, 'v2, 'v3)>

src/S.resi:419:1


src/S.resi
let getOr: (t<option<'value>>, 'value) => t<'value>

src/S.resi:422:3


src/S.resi
let getOrWith: (t<option<'value>>, unit => 'value) => t<'value>

src/S.resi:423:3


src/S.resi:421:8


src/S.resi
type kind =
| Min({length: int})
| Max({length: int})
| Length({length: int})
| Email
| Uuid
| Cuid
| Url
| Pattern({re: Js.Re.t})
| Datetime

src/S.resi:428:5


src/S.resi
type t = {kind: kind, message: string}

src/S.resi:438:5


src/S.resi:427:10


src/S.resi
let refinements: t<'value> => array<Refinement.t>

src/S.resi:444:3


src/S.resi:426:8


src/S.resi
type kind = Min({value: int}) | Max({value: int})

src/S.resi:449:5


src/S.resi
type t = {kind: kind, message: string}

src/S.resi:453:5


src/S.resi:448:10


src/S.resi
let refinements: t<'value> => array<Refinement.t>

src/S.resi:459:3


src/S.resi:447:8


src/S.resi
type kind = Min({value: float}) | Max({value: float})

src/S.resi:464:5


src/S.resi
type t = {kind: kind, message: string}

src/S.resi:467:5


src/S.resi:463:10


src/S.resi
let refinements: t<'value> => array<Refinement.t>

src/S.resi:473:3


src/S.resi:462:8


src/S.resi
type kind =
| Min({length: int})
| Max({length: int})
| Length({length: int})

src/S.resi:478:5


src/S.resi
type t = {kind: kind, message: string}

src/S.resi:482:5


src/S.resi:477:10


src/S.resi
let refinements: t<'value> => array<Refinement.t>

src/S.resi:488:3


src/S.resi:476:8


src/S.resi
type t<'metadata>

src/S.resi:493:5


src/S.resi
let make: (~namespace: string, ~name: string) => t<'metadata>

src/S.resi:494:5


src/S.resi:492:10


src/S.resi
let get: (t<'value>, ~id: Id.t<'metadata>) => option<'metadata>

src/S.resi:497:3


src/S.resi
let set: (t<'value>, ~id: Id.t<'metadata>, 'metadata) => t<'value>

src/S.resi:499:3


src/S.resi:491:8


src/S.resi
let reverse: t<'value> => t<unknown>

src/S.resi:502:1


src/S.resi
let min: (t<'value>, int, ~message: string=?) => t<'value>

src/S.resi:504:1


src/S.resi
let floatMin: (t<float>, float, ~message: string=?) => t<float>

src/S.resi:505:1


src/S.resi
let max: (t<'value>, int, ~message: string=?) => t<'value>

src/S.resi:507:1


src/S.resi
let floatMax: (t<float>, float, ~message: string=?) => t<float>

src/S.resi:508:1


src/S.resi
let length: (t<'value>, int, ~message: string=?) => t<'value>

src/S.resi:510:1


src/S.resi
let port: (t<int>, ~message: string=?) => t<int>

src/S.resi:512:1


src/S.resi
let email: (t<string>, ~message: string=?) => t<string>

src/S.resi:513:1


src/S.resi
let uuid: (t<string>, ~message: string=?) => t<string>

src/S.resi:514:1


src/S.resi
let cuid: (t<string>, ~message: string=?) => t<string>

src/S.resi:515:1


src/S.resi
let url: (t<string>, ~message: string=?) => t<string>

src/S.resi:516:1


src/S.resi
let pattern: (t<string>, Js.Re.t, ~message: string=?) => t<string>

src/S.resi:517:1


src/S.resi
let datetime: (t<string>, ~message: string=?) => t<Js.Date.t>

src/S.resi:518:1


src/S.resi
let trim: t<string> => t<string>

src/S.resi:519:1


src/S.resi
let toJSONSchema: t<'value> => JSONSchema.t

src/S.resi:521:1


src/S.resi
let fromJSONSchema: JSONSchema.t => t<Js.Json.t>

src/S.resi:522:1


src/S.resi
let extendJSONSchema: (t<'value>, JSONSchema.t) => t<'value>

src/S.resi:523:1


src/S.resi
type globalConfigOverride = {
defaultAdditionalItems?: additionalItemsMode,
disableNanNumberValidation?: bool,
}

src/S.resi:525:1


src/S.resi
let global: globalConfigOverride => unit

src/S.resi:530:1


src/S.resi
type t

src/S.resi:533:3


src/S.resi
let value: t

src/S.resi:535:3


src/S.resi
let constructor: (~code: errorCode, ~flag: flag, ~path: Path.t) => error

src/S.resi:537:3


src/S.resi:532:8