Package: effect
Module: Schema
The existential “any schema” type — all type parameters are erased to unknown.
Details
Use Top as a constraint when writing generic utilities that must accept any
schema regardless of its Type, Encoded, or service requirements. It is the
widest possible schema type and therefore gives you the least static information.
In user code prefer the narrower interfaces:
Schema<T> — when you only care about the decoded typeCodec<T, E, RD, RE> — when you need the encoded type and service requirementsConstraintDecoder<T, RD> — for decode-only APIsConstraintEncoder<E, RE> — for encode-only APIsSignature
export interface Top extends
Bottom<
unknown,
unknown,
unknown,
unknown,
SchemaAST.AST,
Top,
unknown,
unknown,
any, // this is because TypeParameters is invariant
unknown,
Mutability,
Optionality,
ConstructorDefault,
Mutability,
Optionality
>
{}
Since v4.0.0