1 | import { EventEmitter } from 'events';
|
2 | import { FeathersApplication, ServiceMixin, Service, ServiceOptions, ServiceInterface, Application, FeathersService, ApplicationHookOptions } from './declarations';
|
3 | export declare class Feathers<Services, Settings> extends EventEmitter implements FeathersApplication<Services, Settings> {
|
4 | services: Services;
|
5 | settings: Settings;
|
6 | mixins: ServiceMixin<Application<Services, Settings>>[];
|
7 | version: string;
|
8 | _isSetup: boolean;
|
9 | protected registerHooks: (this: any, allHooks: any) => any;
|
10 | constructor();
|
11 | get<L extends keyof Settings & string>(name: L): Settings[L];
|
12 | set<L extends keyof Settings & string>(name: L, value: Settings[L]): this;
|
13 | configure(callback: (this: this, app: this) => void): this;
|
14 | defaultService(location: string): ServiceInterface;
|
15 | service<L extends keyof Services & string>(location: L): FeathersService<this, keyof any extends keyof Services ? Service : Services[L]>;
|
16 | protected _setup(): Promise<this>;
|
17 | get setup(): () => Promise<this>;
|
18 | set setup(value: () => Promise<this>);
|
19 | protected _teardown(): Promise<this>;
|
20 | get teardown(): () => Promise<this>;
|
21 | set teardown(value: () => Promise<this>);
|
22 | use<L extends keyof Services & string>(path: L, service: keyof any extends keyof Services ? ServiceInterface | Application : Services[L], options?: ServiceOptions<keyof any extends keyof Services ? string : keyof Services[L]>): this;
|
23 | unuse<L extends keyof Services & string>(location: L): Promise<FeathersService<this, keyof any extends keyof Services ? Service : Services[L]>>;
|
24 | hooks(hookMap: ApplicationHookOptions<this>): this;
|
25 | }
|