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

RelaySub

import { RelaySub } from "https://gitlab.com/soapbox-pub/nostr-machina/-/raw/main/mod.ts";
class RelaySub extends EventTarget {
constructor(opts: RelaySubOpts);
readonly filtersFn: FiltersFn;
readonly relays: string[];
readonly signal?: AbortSignal;
readonly uuid: string;
 
addEventListener<K extends keyof WebSocketEventMap>(
type: K,
listener: (ev: WebSocketEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
removeEventListener<K extends keyof WebSocketEventMap>(
type: K,
listener: (ev: WebSocketEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
}

§Extends

§
EventTarget
[src]

§Constructors

§
new RelaySub(opts: RelaySubOpts)
[src]

§Properties

§
filtersFn: FiltersFn
[src]
§
relays: string[]
[src]
§
signal: AbortSignal
[src]
§
uuid: string
[src]

§Methods

§
addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
[src]
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
[src]
§
removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void
[src]
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void
[src]