effect-io-ai

Package: effect
Module: SchemaGetter

SchemaGetter.String

Coerces any value to a string using the global String() constructor.

When to use

Use when you need a schema getter to coerce a present encoded value to a string with String().

Details

The getter is pure, never fails, and delegates to globalThis.String.

Example (Coercing to a string)

import { SchemaGetter } from "effect"

const toString = SchemaGetter.String<number>()
// Getter<string, number>

See

Signature

declare const String: <E>() => Getter<string, E>

Source

Since v4.0.0