Core utility for creating nominal typing in TypeScript by adding a type tag to any object. This allows for creating distinct types that are structurally identical but considered different by TypeScript's type system.
The string literal type used as the discriminator
The base type to extend with the tag
The parameters containing the tag and implementation
A Typeable object with the specified tag
Core utility for creating nominal typing in TypeScript by adding a type tag to any object. This allows for creating distinct types that are structurally identical but considered different by TypeScript's type system.