zeed
    Preparing search index...

    Class DebugChannel

    Just track messages posted for debug purposes

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _logEmitter: LoggerInterface = ...
    call: {
        close: () => void;
        connect: () => void;
        disconnect: () => void;
        message: (event: ChannelMessageEvent<any>) => void;
        messageerror: (event: ChannelMessageEvent<any>) => void;
    } = ...

    RPC like emitting of events.

    context: ContextType = ...
    dispose: (strictSync?: boolean) => void | Promise<any> & {
        add: (obj?: Disposer) => DisposerFunction | undefined;
        dispose: (strictSync?: boolean) => void | Promise<any>;
        disposed: number;
        disposeSync: () => void;
        exec: (strictSync?: boolean) => void | Promise<any>;
        remove: (disposable: Disposer) => void | Promise<void>;
        sync: () => void;
        track: (obj?: Disposer) => DisposerFunction | undefined;
        untrack: (disposable: Disposer) => void | Promise<void>;
        "[asyncDispose]"(): Promise<any>;
        "[dispose]"(): void | Promise<any>;
        getSize(): number;
        isDisposed(): boolean;
    } = ...

    Type Declaration

      • (strictSync?: boolean): void | Promise<any>
      • Dispose all tracked entries

        Parameters

        • strictSync: boolean = false

        Returns void | Promise<any>

    • add: (obj?: Disposer) => DisposerFunction | undefined
    • dispose: (strictSync?: boolean) => void | Promise<any>
    • disposed: number

      Counter that incremends, each time dispose has been called

    • disposeSync: () => void
    • exec: (strictSync?: boolean) => void | Promise<any>

      use dispose

    • remove: (disposable: Disposer) => void | Promise<void>
    • sync: () => void
    • track: (obj?: Disposer) => DisposerFunction | undefined

      use add

    • untrack: (disposable: Disposer) => void | Promise<void>

      use remove

    • [asyncDispose]: function
    • [dispose]: function
    • getSize: function
    • isDisposed: function
    id: string = ...
    messages: (string | Uint8Array<ArrayBufferLike>)[] = []

    Accessors

    Methods

    • Emits an event to all subscribers and executes their corresponding event handlers.

      Type Parameters

      • U extends "message" | "messageerror" | "connect" | "disconnect" | "close"

      Parameters

      • event: U

        The event to emit.

      • ...args: Parameters<
            {
                close: () => void;
                connect: () => void;
                disconnect: () => void;
                message: (event: ChannelMessageEvent<any>) => void;
                messageerror: (event: ChannelMessageEvent<any>) => void;
            }[U],
        >

        The arguments to pass to the event handlers.

      Returns Promise<boolean>

      A promise that resolves to a boolean indicating whether the event was successfully emitted.

    • Emits an event to all subscribers and executes their corresponding event handlers.

      Type Parameters

      • U extends "message" | "messageerror" | "connect" | "disconnect" | "close"

      Parameters

      • event: U

        The event to emit.

      • ...args: Parameters<
            {
                close: () => void;
                connect: () => void;
                disconnect: () => void;
                message: (event: ChannelMessageEvent<any>) => void;
                messageerror: (event: ChannelMessageEvent<any>) => void;
            }[U],
        >

        The arguments to pass to the event handlers.

      Returns Promise<
          | ReturnType<
              {
                  close: () => void;
                  connect: () => void;
                  disconnect: () => void;
                  message: (event: ChannelMessageEvent<any>) => void;
                  messageerror: (event: ChannelMessageEvent<any>) => void;
              }[U],
          >
          | undefined,
      >

      A promise that resolves to the result of the first subscriber's handler, or undefined if no subscribers are present.

    • Emits an event to all subscribers and executes their corresponding event handlers.

      Type Parameters

      • U extends "message" | "messageerror" | "connect" | "disconnect" | "close"

      Parameters

      • event: U

        The event to emit.

      • ...args: Parameters<
            {
                close: () => void;
                connect: () => void;
                disconnect: () => void;
                message: (event: ChannelMessageEvent<any>) => void;
                messageerror: (event: ChannelMessageEvent<any>) => void;
            }[U],
        >

        The arguments to pass to the event handlers.

      Returns Promise<
          | ReturnType<
              {
                  close: () => void;
                  connect: () => void;
                  disconnect: () => void;
                  message: (event: ChannelMessageEvent<any>) => void;
                  messageerror: (event: ChannelMessageEvent<any>) => void;
              }[U],
          >[]
          | undefined,
      >

      A promise that resolves to an array of results from all subscribers, or undefined if no subscribers are present.