UNPKG

467 BTypeScriptView Raw
1import { Runtype, RuntypeBase, Static } from '../runtype';
2export declare const RuntypeName: unique symbol;
3export interface RuntypeBrand<B extends string> {
4 [RuntypeName]: {
5 [k in B]: B;
6 };
7}
8export interface Brand<B extends string, A extends RuntypeBase> extends Runtype<Static<A> & RuntypeBrand<B>> {
9 tag: 'brand';
10 brand: B;
11 entity: A;
12}
13export declare function Brand<B extends string, A extends RuntypeBase>(brand: B, entity: A): any;