effect-io-ai

Package: effect
Module: Brand

Brand.check

Creates a branded type Constructor from one or more schema checks.

When to use

Use when you need a branded type constructor that performs runtime validation via schema checks.

Details

Calling the returned constructor validates the unbranded value and throws on failure. Use the returned option, result, or is methods for non-throwing validation.

See

Signature

declare const check: <A extends Brand<any>>(checks_0: SchemaAST.Check<Brand.Unbranded<A>>, ...checks: Array<SchemaAST.Check<Brand.Unbranded<A>>>) => Constructor<A>

Source

Since v4.0.0