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

MsgAdapter

import type { MsgAdapter } from "https://raw.githubusercontent.com/nats-io/nats.deno/v1.27.0/nats-base-client/internal_mod.ts";

Converts a NATS message into some other type. Implementers are expected to: return [err, null] if the message callback is invoked with an error. return [err, null] if converting the message yielded an error, note that iterators will stop on the error, but callbacks will be presented with the error. return [null, T] if the conversion worked correctly

type MsgAdapter<T> = (err: NatsError | null, msg: Msg) => [NatsError | null, T | null];

§Type Parameters

§Type

§
(err: NatsError | null, msg: Msg) => [NatsError | null, T | null]
[src]