Schema overview

This module is experimental

Experimental features are published in order to get early feedback from the community, see these tracking issues for further discussions and enhancements.

A feature tagged as Experimental is in a high state of flux, you’re at risk of it changing without notice.

Added in v2.2.0


Table of contents


constructors

make

Signature

export declare function make<A>(schema: Schema<A>): Schema<A>

Added in v2.2.0

model

Schema (interface)

Signature

export interface Schema<A> {
  <S>(S: Schemable<S>): HKT<S, A>
}

Added in v2.2.0

utils

TypeOf (type alias)

Signature

export type TypeOf<S> = S extends Schema<infer A> ? A : never

Added in v2.2.0

interpreter

Signature

export declare function interpreter<S extends URIS2>(
  S: Schemable2C<S, unknown>
): <A>(schema: Schema<A>) => Kind2<S, unknown, A>
export declare function interpreter<S extends URIS>(S: Schemable1<S>): <A>(schema: Schema<A>) => Kind<S, A>

Added in v2.2.3