Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Codec

import type { Codec } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.28.2/nats-base-client/internal_mod.ts";
interface Codec <T> {
decode(a: Uint8Array): T;
encode(d: T): Uint8Array;
}

§Type Parameters

§Methods

§
decode(a: Uint8Array): T
[src]

Decode an Uint8Array from a message payload into a T

@param a
§
encode(d: T): Uint8Array
[src]

Encode T to an Uint8Array suitable for including in a message payload.

@param d