Skip to content

assertCodecIsType

assertCodecIsType(codec, types): void

Checks nested codec types against a type description string. Uses codec.toRawType() internally.

codec: Codec

The codec to type check.

types

An array of strings denoting types to check against.

void

TypeError If codec type is not contained in the allowed types.

utils/src/Decode.ts:30