Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/natsws/src/mod.ts>Codec

WebSocket NATS
Latest
interface Codec
import { type Codec } from "https://deno.land/x/natsws@v1.29.2/src/mod.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