UNPKG

node-jet

Version:

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

12 lines (11 loc) 536 B
import type { State } from './peer/state.js'; import type { Method } from './peer/method.js'; import type { JSONRPCError } from './errors.js'; import type { ErrorType, ValueType } from './types.js'; export declare const getValue: (o: any, field: string) => any; export declare const errorObject: (err: JSONRPCError | ErrorType | string) => JSONRPCError | { code: number; message: string; data: ErrorType; }; export declare const isState: <T extends ValueType>(stateOrMethod: State<T> | Method) => stateOrMethod is State<T>;