UNPKG

@feathersjs/transport-commons

Version:

Shared functionality for websocket providers

13 lines (12 loc) 506 B
import { EventEmitter } from 'events'; import { RealTimeConnection } from '@feathersjs/feathers'; export declare class Channel extends EventEmitter { connections: RealTimeConnection[]; data: any; constructor(connections?: RealTimeConnection[], data?: any); get length(): number; leave(...connections: RealTimeConnection[]): this; join(...connections: RealTimeConnection[]): this; filter(fn: (connection: RealTimeConnection) => boolean): Channel; send(data: any): Channel; }