effect-io-ai

Package: effect
Module: Schema

Schema.Codec.Encoded

Extracts the encoded (Encoded) type from a schema.

Example (Extracting the encoded type)

import { Schema } from "effect"

const schema = Schema.NumberFromString
type Enc = Schema.Codec.Encoded<typeof schema>
// string

Signature

type Encoded<S> = S extends { readonly "Encoded": infer E } ? E : never

Source

Since v3.10.0