effect-io-ai

Package: effect
Module: SchemaTransformation

SchemaTransformation.isTransformation

Returns true if u is a Transformation instance.

When to use

Use to check whether a value is already a schema transformation before wrapping it.

Details

Example (Checking a value)

import { SchemaTransformation } from "effect"

SchemaTransformation.isTransformation(SchemaTransformation.trim())
// true

SchemaTransformation.isTransformation({ decode: null, encode: null })
// false

See

Signature

declare const isTransformation: (u: unknown) => u is Transformation<any, any, unknown, unknown>

Source

Since v4.0.0