<Row extends Schema.Schema<unknown>>(row: Row): StoreShapeDef<Row>Declare a row shape. Every shape shares the baked-in read payload
(limit / before / after / nested RQB where).
export function function shape<
Row extends Schema.Schema<unknown>
>(row: Row): StoreShapeDef<Row>
Declare a row shape. Every shape shares the baked-in read payload
(limit / before / after / nested RQB where).
shape<function (type parameter) Row in shape<Row extends Schema.Schema<unknown>>(row: Row): StoreShapeDef<Row>Row extends import SchemaSchema.interface Schema<out T>Namespace of type-level helpers for
Schema
.
A typed view of a schema that tracks only the decoded (output) type T.
Details
Use Schema<T> as a constraint when you want to accept "any schema that
decodes to T" and do not need to know or constrain the encoded
representation, required services, or any other type parameters.
This is a structural interface — concrete schema values are produced by the
constructors in this module (e.g.
Struct
,
String
,
Number
).
When you also need the encoded type or service requirements, use
Codec
.
Example (Accepting any schema decoding to string)
import { Schema } from "effect"
declare function print(schema: Schema.Schema<string>): void
print(Schema.String) // ok
print(Schema.NonEmptyString) // ok
Schema<unknown>>(row: Row extends Schema.Schema<unknown>row: function (type parameter) Row in shape<Row extends Schema.Schema<unknown>>(row: Row): StoreShapeDef<Row>Row): import StoreShapeDefStoreShapeDef<function (type parameter) Row in shape<Row extends Schema.Schema<unknown>>(row: Row): StoreShapeDef<Row>Row> {
return import makeStoreShapemakeStoreShape(row: Row extends Schema.Schema<unknown>row);
}