Module

x/msgpack/mod.ts>ExtensionCodec

msgpack-javascript ported to deno
Latest
class ExtensionCodec
import { ExtensionCodec } from "https://dotland.deno.dev/x/msgpack@v1.4/mod.ts";

Constructors

new
ExtensionCodec()

Type Parameters

optional
ContextType = undefined

Properties

private
readonly
builtInDecoders: Array<ExtensionDecoderType<ContextType> | undefined | null>
private
readonly
builtInEncoders: Array<ExtensionEncoderType<ContextType> | undefined | null>
private
readonly
decoders: Array<ExtensionDecoderType<ContextType> | undefined | null>
private
readonly
encoders: Array<ExtensionEncoderType<ContextType> | undefined | null>
optional
__brand: ContextType

Methods

decode(
data: Uint8Array,
type: number,
context: ContextType,
): unknown
register(unnamed 0: { type: number; encode: ExtensionEncoderType<ContextType>; decode: ExtensionDecoderType<ContextType>; }): void
tryToEncode(object: unknown, context: ContextType): ExtData | null

Static Properties

readonly
defaultCodec: ExtensionCodecType<undefined>