Coda by Ian Macalinao
    Preparing search index...

    Type Alias CodamaErrorCode

    CodamaErrorCode:
        | typeof CODAMA_ERROR__ANCHOR__ACCOUNT_TYPE_MISSING
        | typeof CODAMA_ERROR__ANCHOR__ARGUMENT_TYPE_MISSING
        | typeof CODAMA_ERROR__ANCHOR__PROGRAM_ID_KIND_UNIMPLEMENTED
        | typeof CODAMA_ERROR__ANCHOR__SEED_KIND_UNIMPLEMENTED
        | typeof CODAMA_ERROR__ANCHOR__TYPE_PATH_MISSING
        | typeof CODAMA_ERROR__ANCHOR__UNRECOGNIZED_IDL_TYPE
        | typeof CODAMA_ERROR__DISCRIMINATOR_FIELD_HAS_NO_DEFAULT_VALUE
        | typeof CODAMA_ERROR__DISCRIMINATOR_FIELD_NOT_FOUND
        | typeof CODAMA_ERROR__ENUM_VARIANT_NOT_FOUND
        | typeof CODAMA_ERROR__LINKED_NODE_NOT_FOUND
        | typeof CODAMA_ERROR__NODE_FILESYSTEM_FUNCTION_UNAVAILABLE
        | typeof CODAMA_ERROR__RENDERERS__UNSUPPORTED_NODE
        | typeof CODAMA_ERROR__UNEXPECTED_NESTED_NODE_KIND
        | typeof CODAMA_ERROR__UNEXPECTED_NODE_KIND
        | typeof CODAMA_ERROR__UNRECOGNIZED_BYTES_ENCODING
        | typeof CODAMA_ERROR__UNRECOGNIZED_NODE_KIND
        | typeof CODAMA_ERROR__UNRECOGNIZED_NUMBER_FORMAT
        | typeof CODAMA_ERROR__VERSION_MISMATCH
        | typeof CODAMA_ERROR__VISITORS__ACCOUNT_FIELD_NOT_FOUND
        | typeof CODAMA_ERROR__VISITORS__CANNOT_ADD_DUPLICATED_PDA_NAMES
        | typeof CODAMA_ERROR__VISITORS__CANNOT_EXTEND_MISSING_VISIT_FUNCTION
        | typeof CODAMA_ERROR__VISITORS__CANNOT_FLATTEN_STRUCT_WITH_CONFLICTING_ATTRIBUTES
        | typeof CODAMA_ERROR__VISITORS__CANNOT_REMOVE_LAST_PATH_IN_NODE_STACK
        | typeof CODAMA_ERROR__VISITORS__CANNOT_USE_OPTIONAL_ACCOUNT_AS_PDA_SEED_VALUE
        | typeof CODAMA_ERROR__VISITORS__CYCLIC_DEPENDENCY_DETECTED_WHEN_RESOLVING_INSTRUCTION_DEFAULT_VALUES
        | typeof CODAMA_ERROR__VISITORS__FAILED_TO_VALIDATE_NODE
        | typeof CODAMA_ERROR__VISITORS__INSTRUCTION_ENUM_ARGUMENT_NOT_FOUND
        | typeof CODAMA_ERROR__VISITORS__INVALID_INSTRUCTION_DEFAULT_VALUE_DEPENDENCY
        | typeof CODAMA_ERROR__VISITORS__INVALID_NUMBER_WRAPPER
        | typeof CODAMA_ERROR__VISITORS__INVALID_PDA_SEED_VALUES
        | typeof CODAMA_ERROR__VISITORS__RENDER_MAP_KEY_NOT_FOUND

    A union of every Codama error code

    You might be wondering why this is not a TypeScript enum or const enum.

    One of the goals of this library is to enable people to use some or none of it without having to bundle all of it.

    If we made the set of error codes an enum then anyone who imported it (even if to only use a single error code) would be forced to bundle every code and its label.

    Const enums appear to solve this problem by letting the compiler inline only the codes that are actually used. Unfortunately exporting ambient (const) enums from a library like @codama/errors is not safe, for a variety of reasons covered here: https://stackoverflow.com/a/28818850