brand
brand: <
S,B>(brand,annotations?) => (self) =>brand<S,B>
Defined in: node_modules/.pnpm/effect@3.15.2/node_modules/effect/dist/dts/Schema.d.ts:1572
Returns a nominal branded schema by applying a brand to a given schema.
Schema<A> + B -> Schema<A & Brand<B>>Type Parameters
Section titled “Type Parameters”S extends AnyNoContext
B extends string | symbol
Parameters
Section titled “Parameters”B
annotations?
Section titled “annotations?”Schema<Type<S> & Brand<B>, readonly []>
Returns
Section titled “Returns”(
self):brand<S,B>
Parameters
Section titled “Parameters”S
Returns
Section titled “Returns”brand<S, B>
Example
Section titled “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">3.10.0