We represent ContractIds as strings. Their exact format of these strings depends on the ledger
the Daml application is running on.
The purpose of the intersection with { [ContractIdBrand]: T } is to
prevent accidental use of a ContractId<T> when a ContractId<U> is
needed (unless T is a subtype of U). This technique is known as
"branding" in the TypeScript community.
The counterpart of Daml's
ContractId Ttype.We represent
ContractIds as strings. Their exact format of these strings depends on the ledger the Daml application is running on.The purpose of the intersection with
{ [ContractIdBrand]: T }is to prevent accidental use of aContractId<T>when aContractId<U>is needed (unlessTis a subtype ofU). This technique is known as "branding" in the TypeScript community.