Skip to content

WireSerializationCodeMap<Code> = Readonly<Record<WireInvalidInputErrorCode, Code>>

Defined in: packages/wire/src/serialization-errors.ts:14

A package’s translation from wire’s caller-contract codes to its own closed invalid-input codes.

Declaring this record is what keeps the translation exhaustive: Code is the package’s own union, so deleting a code from the package’s closed list fails to typecheck here, and adding a code to WireInvalidInputErrorCode fails to typecheck in every package until it says what the new failure means.

Code extends string