Effect CommunityEC
Effect Communityβ€’2y agoβ€’
37 replies
sign error

Why is the first Type Parameter of a Schema `never`?

Why is the first type Parameter of some Schema always (or by default) never? For Instance:

const Foo = S.struct({ name: S.string })


const Foo: S.Schema<never, {
    readonly name: string;
}, {
    readonly name: string;
}>


I can't really figure out how to define an Schema, that it meant to convert from string to Foo . Somehow I cannot get my Head around how that is meant to work.
Was this page helpful?