brand
brand<
S
,B
>(brand
,annotations
?): (self
) =>brand
<S
,B
>
Defined in: node_modules/.pnpm/effect@3.14.8/node_modules/effect/dist/dts/Schema.d.ts:1594
Returns a nominal branded schema by applying a brand to a given schema.
Schema<A> + B -> Schema<A & Brand<B>>
Type Parameters
• S extends AnyNoContext
• B extends string
| symbol
Parameters
brand
B
annotations?
Schema
<Type
<S
> & Brand
<B
>, readonly []>
Returns
Function
Parameters
self
S
Returns
brand
<S
, B
>
Example
import * as Schema from "effect/Schema"
const Int = Schema.Number.pipe(Schema.int(), Schema.brand("Int"))type Int = Schema.Schema.Type<typeof Int> // number & Brand<"Int">
Since
3.10.0