@event-driven-platform/types
v0.1.4
Published
Shared TypeScript utility types for the event-driven platform.
Downloads
949
Readme
@event-driven-platform/types
Shared TypeScript type primitives used by the platform packages.
Installation
pnpm add @event-driven-platform/typesAPI
Brand<T, TBrand>
Creates a nominally distinct type from a structural TypeScript type. Platform identity packages use it to prevent values with the same runtime representation from being mixed accidentally.
import type { Brand } from '@event-driven-platform/types';
type UserId = Brand<string, 'UserId'>;
type OrderId = Brand<string, 'OrderId'>;Brand is a type-only utility and adds no runtime behavior.
