Hyperlinkv0.8.0-beta.28

SchemaGetter

SchemaGetter.Stringfunctioneffect/SchemaGetter.ts:673
<E>(): Getter<string, E>

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>
Coercionstransform
export function String<E>(): Getter<string, E> {
  return transform(globalThis.String)
}
Referenced by 3 symbols