declare module 'feathers-client' { import events = require('events'); interface FeathersApp { // Authentication. authenticate(options: any) :Promise; logout(): void; get(type: string): any; // Services. service(name: string): FeathersService; configure(fn: () => void): FeathersApp; } interface FeathersService extends events.EventEmitter { // REST interface. find(params?: any): Promise; get(id: string, params?: any): Promise; create(data: T, params?: any): Promise; update(id: string, data: T, params?: any): Promise; patch(id: string, data: T, params?: any) : Promise; remove(id: string, params?: any): Promise; // Realtime interface. on(eventType: string, callback: (data: T) => void); timeout?: number; } interface FeathersFactory { (): FeathersApp; socketio: (socket: any) => any; primus: (config: any, configurer: any | Function) => () => void; rest: (base: string) => any; hooks: () => any; authentication: (config?: any) => () => void; errors: any; } const feathers: FeathersFactory; export default feathers; }