import { HKT2, Kind, Kind2, URIS, URIS2 } from 'fp-ts/HKT'; import { SchemableExt, SchemableExt1, SchemableExt2, SchemableExt2C } from 'schemata-ts/SchemableExt'; /** * @since 1.0.0 * @category Model */ export interface SchemaExt { (S: SchemableExt): HKT2; } /** * @since 1.0.0 * @category Model */ export declare type Interpreter = { (S: SchemableExt2): (schema: SchemaExt) => Kind2; (S: SchemableExt2C): (schema: SchemaExt) => Kind2; (S: SchemableExt1): (schema: SchemaExt) => Kind; }; /** * @since 1.0.0 * @category Constructors */ export declare function make(f: SchemaExt): SchemaExt; /** * Extract the output of a schema * * @since 1.0.0 * @category Utilities * @example * import * as O from 'fp-ts/Option' * import * as S from 'schemata-ts/schemata' * import { getEncoder } from 'schemata-ts/Encoder' * * const optionFromNullable = S.OptionFromNullable(S.String) * * // type Input = S.InputOf * // type Input = string | null * * // type Output = S.OutputOf * // Option * * const encoder = getEncoder(optionFromNullable) * * assert.deepStrictEqual(encoder.encode(O.some('a')), 'a') * assert.deepStrictEqual(encoder.encode(O.none), null) */ export declare type TypeOf = S extends SchemaExt ? A : never; /** * Extract the output of a schema. * * Alias of `TypeOf` * * @since 1.0.0 * @category Utilities */ export declare type OutputOf = TypeOf; /** * Extract the input type of a schema. * * @since 1.0.0 * @category Utilities */ export declare type InputOf = S extends SchemaExt ? I : never; /** * Derives a typeclass instance from a Schema by supplying Schemable. i.e. `schemata-ts/Decoder` * * @since 1.0.0 * @category Destructors */ export declare const interpret: Interpreter; //# sourceMappingURL=SchemaExt.d.ts.map