UNPKG

@alexaegis/common

Version:

Common utility functions

10 lines 365 B
export declare const __brand: unique symbol; export type Brand<B> = { [__brand]: B; }; export type Branded<T, B> = T & Brand<B>; export type LoosenBrand<T extends Branded<unknown, unknown>> = Omit<T, typeof __brand> & { [__brand]?: T[typeof __brand]; }; export type BrandedLoosely<T, B> = LoosenBrand<Branded<T, B>>; //# sourceMappingURL=brand.type.d.ts.map