UNPKG

node-jet

Version:

Jet Realtime Message Bus for the Web. Daemon and Peer implementation.

19 lines (18 loc) 591 B
/** * Helpers */ import type { JsonParams } from './index.js'; import { EventEmitter } from '../../1_socket/index.js'; import type { ValueType } from '../types.js'; /** * A method is a path that can be called. The peer.call method can be used to call methods */ export declare class Method extends EventEmitter { _path: string; private readonly _writeGroup; constructor(path: string, writeGroup?: string); path: () => string; call: (args: ValueType[] | Record<string, ValueType> | undefined) => void; toJson: () => JsonParams<ValueType>; } export default Method;