S
src/S.resi:6:8
numberFormat
Section titled “numberFormat”type numberFormat = @as("int32") Int32 | @as("port") Port
src/S.resi:23:1
stringFormat
Section titled “stringFormat”type stringFormat = @as("json") JSON
src/S.resi:24:1
format
Section titled “format”type format = | @as("int32") Int32 | @as("port") Port | @as("json") JSON
src/S.resi:26:1
additionalItemsMode
Section titled “additionalItemsMode”@unboxedtype additionalItemsMode = | @as("strip") Strip | @as("strict") Strict
src/S.resi:29:1
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
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
type meta<'value> = { name?: string, title?: string, description?: string, deprecated?: bool, examples?: array<'value>,}
src/S.resi:196:1
untagged
Section titled “untagged”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
additionalItems
Section titled “additionalItems”@unboxedtype additionalItems = | @as("strip") Strip | @as("strict") Strict | Schema(t<unknown>)
src/S.resi:228:1
type item = {schema: t<unknown>, location: string}
src/S.resi:229:1
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
type error = private { message: string, reason: string, path: Path.t, code: errorCode, flag: flag,}
src/S.resi:249:1
errorCode
Section titled “errorCode”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
type s<'value> = { schema: t<'value>, fail: 'a. (string, ~path: Path.t=?) => 'a,}
src/S.resi:268:1
jsonStringOutput
Section titled “jsonStringOutput”let jsonStringOutput: flag
src/S.resi:279:3
src/S.resi:273:8
jsonStringWithSpace
Section titled “jsonStringWithSpace”let jsonStringWithSpace: int => t<string>
src/S.resi:301:1
enableJsonString
Section titled “enableJsonString”let enableJsonString: unit => unit
src/S.resi:302:1
nullable
Section titled “nullable”let nullable: t<'value> => t<Js.nullable<'value>>
src/S.resi:312:1
nullableAsOption
Section titled “nullableAsOption”let nullableAsOption: t<'value> => t<option<'value>>
src/S.resi:313:1
let meta: (t<'value>, meta<'value>) => t<'value>
src/S.resi:317:1
transformDefinition
Section titled “transformDefinition”type transformDefinition<'input, 'output> = { parser?: 'input => 'output, asyncParser?: 'input => promise<'output>, serializer?: 'output => 'input,}
src/S.resi:319:1
transform
Section titled “transform”let transform: ( t<'input>, s<'output> => transformDefinition<'input, 'output>,) => t<'output>
src/S.resi:327:1
refine
Section titled “refine”let refine: (t<'value>, s<'value> => 'value => unit) => t<'value>
src/S.resi:329:1
let shape: (t<'value>, 'value => 'shape) => t<'shape>
src/S.resi:331:1
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
output
Section titled “output”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
type mode<'output, 'computed> = | Sync: mode<'output, 'output> | Async: mode<'output, promise<'output>>
src/S.resi:347:1
compile
Section titled “compile”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
parseOrThrow
Section titled “parseOrThrow”let parseOrThrow: ('any, t<'value>) => 'value
src/S.resi:359:1
parseJsonOrThrow
Section titled “parseJsonOrThrow”let parseJsonOrThrow: (Js.Json.t, t<'value>) => 'value
src/S.resi:360:1
parseJsonStringOrThrow
Section titled “parseJsonStringOrThrow”let parseJsonStringOrThrow: (string, t<'value>) => 'value
src/S.resi:361:1
parseAsyncOrThrow
Section titled “parseAsyncOrThrow”let parseAsyncOrThrow: ('any, t<'value>) => promise<'value>
src/S.resi:362:1
convertOrThrow
Section titled “convertOrThrow”let convertOrThrow: ('any, t<'value>) => 'value
src/S.resi:364:1
convertToJsonOrThrow
Section titled “convertToJsonOrThrow”let convertToJsonOrThrow: ('any, t<'value>) => Js.Json.t
src/S.resi:365:1
convertToJsonStringOrThrow
Section titled “convertToJsonStringOrThrow”let convertToJsonStringOrThrow: ('any, t<'value>) => string
src/S.resi:366:1
convertAsyncOrThrow
Section titled “convertAsyncOrThrow”let convertAsyncOrThrow: ('any, t<'value>) => promise<'value>
src/S.resi:367:1
reverseConvertOrThrow
Section titled “reverseConvertOrThrow”let reverseConvertOrThrow: ('value, t<'value>) => unknown
src/S.resi:369:1
reverseConvertToJsonOrThrow
Section titled “reverseConvertToJsonOrThrow”let reverseConvertToJsonOrThrow: ('value, t<'value>) => Js.Json.t
src/S.resi:370:1
reverseConvertToJsonStringOrThrow
Section titled “reverseConvertToJsonStringOrThrow”let reverseConvertToJsonStringOrThrow: ('value, t<'value>, ~space: int=?) => string
src/S.resi:371:1
assertOrThrow
Section titled “assertOrThrow”let assertOrThrow: ('any, t<'value>) => unit
src/S.resi:373:1
recursive
Section titled “recursive”let recursive: (string, t<'value> => t<'value>) => t<'value>
src/S.resi:377:1
noValidation
Section titled “noValidation”let noValidation: (t<'value>, bool) => t<'value>
src/S.resi:379:1
toExpression
Section titled “toExpression”let toExpression: t<'value> => string
src/S.resi:381:1
castToUnknown
Section titled “castToUnknown”let castToUnknown: t<'value> => t<unknown>
src/S.resi:383:1
schema
Section titled “schema”let schema: (Schema.s => 'value) => t<'value>
src/S.resi:390:1
Object
Section titled “Object”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
object
Section titled “object”let object: (Object.s => 'value) => t<'value>
src/S.resi:402:1
deepStrip
Section titled “deepStrip”let deepStrip: t<'value> => t<'value>
src/S.resi:405:1
deepStrict
Section titled “deepStrict”let deepStrict: t<'value> => t<'value>
src/S.resi:407:1
type s = { item: 'value. (int, t<'value>) => 'value, tag: 'value. (int, 'value) => unit,}
src/S.resi:410:3
src/S.resi:409:8
tuple2
Section titled “tuple2”let tuple2: (t<'v1>, t<'v2>) => t<('v1, 'v2)>
src/S.resi:418:1
tuple3
Section titled “tuple3”let tuple3: (t<'v1>, t<'v2>, t<'v3>) => t<('v1, 'v2, 'v3)>
src/S.resi:419:1
Option
Section titled “Option”let getOr: (t<option<'value>>, 'value) => t<'value>
src/S.resi:422:3
getOrWith
Section titled “getOrWith”let getOrWith: (t<option<'value>>, unit => 'value) => t<'value>
src/S.resi:423:3
src/S.resi:421:8
String
Section titled “String”Refinement
Section titled “Refinement”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:427:10
refinements
Section titled “refinements”let refinements: t<'value> => array<Refinement.t>
src/S.resi:444:3
src/S.resi:426:8
Refinement
Section titled “Refinement”type kind = Min({value: int}) | Max({value: int})
src/S.resi:449:5
src/S.resi:448:10
refinements
Section titled “refinements”let refinements: t<'value> => array<Refinement.t>
src/S.resi:459:3
src/S.resi:447:8
Refinement
Section titled “Refinement”type kind = Min({value: float}) | Max({value: float})
src/S.resi:464:5
src/S.resi:463:10
refinements
Section titled “refinements”let refinements: t<'value> => array<Refinement.t>
src/S.resi:473:3
src/S.resi:462:8
Refinement
Section titled “Refinement”type kind = | Min({length: int}) | Max({length: int}) | Length({length: int})
src/S.resi:478:5
src/S.resi:477:10
refinements
Section titled “refinements”let refinements: t<'value> => array<Refinement.t>
src/S.resi:488:3
src/S.resi:476:8
Metadata
Section titled “Metadata”let make: (~namespace: string, ~name: string) => t<'metadata>
src/S.resi:494:5
src/S.resi:492:10
let get: (t<'value>, ~id: Id.t<'metadata>) => option<'metadata>
src/S.resi:497:3
let set: (t<'value>, ~id: Id.t<'metadata>, 'metadata) => t<'value>
src/S.resi:499:3
src/S.resi:491:8
let min: (t<'value>, int, ~message: string=?) => t<'value>
src/S.resi:504:1
floatMin
Section titled “floatMin”let floatMin: (t<float>, float, ~message: string=?) => t<float>
src/S.resi:505:1
let max: (t<'value>, int, ~message: string=?) => t<'value>
src/S.resi:507:1
floatMax
Section titled “floatMax”let floatMax: (t<float>, float, ~message: string=?) => t<float>
src/S.resi:508:1
length
Section titled “length”let length: (t<'value>, int, ~message: string=?) => t<'value>
src/S.resi:510:1
let port: (t<int>, ~message: string=?) => t<int>
src/S.resi:512:1
let email: (t<string>, ~message: string=?) => t<string>
src/S.resi:513:1
let uuid: (t<string>, ~message: string=?) => t<string>
src/S.resi:514:1
let cuid: (t<string>, ~message: string=?) => t<string>
src/S.resi:515:1
let url: (t<string>, ~message: string=?) => t<string>
src/S.resi:516:1
pattern
Section titled “pattern”let pattern: (t<string>, Js.Re.t, ~message: string=?) => t<string>
src/S.resi:517:1
datetime
Section titled “datetime”let datetime: (t<string>, ~message: string=?) => t<Js.Date.t>
src/S.resi:518:1
toJSONSchema
Section titled “toJSONSchema”let toJSONSchema: t<'value> => JSONSchema.t
src/S.resi:521:1
fromJSONSchema
Section titled “fromJSONSchema”let fromJSONSchema: JSONSchema.t => t<Js.Json.t>
src/S.resi:522:1
extendJSONSchema
Section titled “extendJSONSchema”let extendJSONSchema: (t<'value>, JSONSchema.t) => t<'value>
src/S.resi:523:1
globalConfigOverride
Section titled “globalConfigOverride”type globalConfigOverride = { defaultAdditionalItems?: additionalItemsMode, disableNanNumberValidation?: bool,}
src/S.resi:525:1
ErrorClass
Section titled “ErrorClass”constructor
Section titled “constructor”let constructor: (~code: errorCode, ~flag: flag, ~path: Path.t) => error
src/S.resi:537:3
src/S.resi:532:8