UNPKG

@xylabs/typeof

Version:

Base functionality used throughout XY Labs TypeScript/JavaScript libraries

5 lines 212 B
/** Creates a branded type by intersecting base type T with brand type B, enabling nominal typing in TypeScript. */ export type Brand<T, B> = T & { [K in keyof B]: B[K]; }; //# sourceMappingURL=Brand.d.ts.map