UNPKG

@feathersjs/transport-commons

Version:

Shared functionality for websocket providers

10 lines (9 loc) 667 B
import { HookContext, Application, RealTimeConnection } from '@feathersjs/feathers'; import { CombinedChannel } from '../channels/channel/combined'; export declare const DEFAULT_PARAMS_POSITION = 1; export declare const paramsPositions: { [key: string]: number; }; export declare function normalizeError(e: any): any; export declare function getDispatcher(emit: string, socketMap: WeakMap<RealTimeConnection, any>, socketKey?: any): (event: string, channel: CombinedChannel, context: HookContext, data?: any) => void; export declare function runMethod(app: Application, connection: RealTimeConnection, _path: string, _method: string, args: any[]): Promise<void>;