UNPKG

834 BTypeScriptView Raw
1import { Application, Params, RealTimeConnection } from '@feathersjs/feathers';
2import { Socket } from 'socket.io';
3export type ParamsGetter = (socket: Socket) => any;
4export type NextFunction = (err?: any) => void;
5export interface FeathersSocket extends Socket {
6 feathers?: Params & {
7 [key: string]: any;
8 };
9}
10export declare const disconnect: (app: Application, getParams: ParamsGetter, socketMap: WeakMap<RealTimeConnection, FeathersSocket>) => (socket: FeathersSocket, next: NextFunction) => void;
11export declare const params: (_app: Application, socketMap: WeakMap<RealTimeConnection, FeathersSocket>) => (socket: FeathersSocket, next: NextFunction) => void;
12export declare const authentication: (app: Application, getParams: ParamsGetter, settings?: any) => (socket: FeathersSocket, next: NextFunction) => void;