effect-io-ai

Package: effect
Module: SchemaGetter

SchemaGetter.passthroughSupertype

Returns the identity getter typed for the relationship T extends E.

When to use

Use when you need a schema getter that passes values through when the decoded/output type is narrower than the encoded/input type.

Details

Example (Passing through supertypes)

import { SchemaGetter } from "effect"

// string extends string, so this is valid
const g = SchemaGetter.passthroughSupertype<string, string>()

See

Signature

declare const passthroughSupertype: <T extends E, E>() => Getter<T, E>

Source

Since v4.0.0