Skip to main content

asId

@retinue/monorepo


@retinue/monorepo / backend/src / asId

Function: asId()

asId<T>(value): T

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

Casts a raw string to a branded ID. Reserved for boundaries that have already validated the value — adapters reading a database row, or a resolver that has authenticated the caller. Never call this on model-generated input.

Type Parameters​

T​

T extends Branded<string, string>

Parameters​

value​

string

Returns​

T