augment-vir - v31.47.0
    Preparing search index...

    Type Alias Branded<OriginalType, BrandKey>

    Brand any type so that it is no longer assignable to itself. For example, brand a database id string type so that standard strings cannot be assigned to it.

    Largely inspired by the Tagged type from the type-fest package at https://github.com/sindresorhus/type-fest/blob/687a89d94c4403d93ac5cb969ac7f492cee006cb/source/tagged.d.ts

    Type Parameters

    • OriginalType
    • BrandKey extends PropertyKey
    import {Branded, createBrander} from '@augment-vir/common';

    type MyId = Branded<string, 'my-database-id-type'>;