@feathersjs/socketio
Version:
The Feathers Socket.io real-time API provider
13 lines (12 loc) • 834 B
TypeScript
import { Application, Params, RealTimeConnection } from '@feathersjs/feathers';
import { Socket } from 'socket.io';
export type ParamsGetter = (socket: Socket) => any;
export type NextFunction = (err?: any) => void;
export interface FeathersSocket extends Socket {
feathers?: Params & {
[key: string]: any;
};
}
export declare const disconnect: (app: Application, getParams: ParamsGetter, socketMap: WeakMap<RealTimeConnection, FeathersSocket>) => (socket: FeathersSocket, next: NextFunction) => void;
export declare const params: (_app: Application, socketMap: WeakMap<RealTimeConnection, FeathersSocket>) => (socket: FeathersSocket, next: NextFunction) => void;
export declare const authentication: (app: Application, getParams: ParamsGetter, settings?: any) => (socket: FeathersSocket, next: NextFunction) => void;