chore: add branded literal type doc

This commit is contained in:
sofinico
2025-04-22 11:05:19 +02:00
parent 13090aa374
commit 029c19922d

View File

@@ -4,6 +4,14 @@ import { EVMEndpointContract } from "../evmUtils/evmContractAddresses"
import { BigNumber } from "../utils/BigNumber"
import { InvalidMethodParametersError } from "../utils/errors"
/**
* A branded literal type used for SDK-specific types `ChainId`, `TokenId` and `SDKNumber`.
*
* For example:
* - `"bitcoin-mainnet (BroSDK ChainId)"` represents a valid `ChainId`
* - `"brc20-something (BroSDK TokenId)"` represents a valid `TokenId`
* - `"10 (BroSDK number)"` represents a valid `SDKNumber`
*/
type SDKBrandedLiteral<
Type extends string,
T extends string | number,