Examples
const StatusId = setTypeId('Status')
// StatusId === 'Status'Function
setTypeId(name: string): TypeIdMarks an explicit string as a TypeId for APIs that identify types
by ID.
Use this to provide a type ID when the type has no runtime constructor, such
as an enum or a union. The function does not validate, normalize, or look up
name; it returns the same string with the TypeId annotation. The
result can be supplied to an API that registers or looks up type metadata.
Prefer typeid or typeidGeneric when a runtime constructor
exists.
Because any string is accepted, this function can create an ID with no corresponding type metadata. Use the exact name expected by the consuming API.
const StatusId = setTypeId('Status')
// StatusId === 'Status'