Skip to main content

Branded

@forge/monorepo


@forge/monorepo / backend/src / Branded

Type Alias: Branded<T, B>

Branded<T, B> = T & object

Defined in: backend/src/core/ids.ts:15

Exported so a downstream package can mint its own IDs with the same mechanism rather than a second, incompatible one. asId is generic over this, so an integration package's PostDraftId gets the same "cannot be passed where another ID is expected" guarantee the platform's own IDs have.

Type Declaration

[brand]

readonly [brand]: B

Type Parameters

T

T

B

B extends string