Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface Codec
import { type Codec } from "https://deno.land/x/natsws@v1.28.0/src/nats-base-client.ts";

Methods

encode(d: T): Uint8Array

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

decode(a: Uint8Array): T

Decode an Uint8Array from a message payload into a T