-
Notifications
You must be signed in to change notification settings - Fork 4
/
microgears.d.ts
32 lines (23 loc) · 748 Bytes
/
microgears.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Type definitions for microgears v4.0.x
// Project: http://github.com/marcusdb/microgears
// Definitions by: Marcus David Bronstein <https://github.com/marcusdb>
export interface Service {
name:string;
async ?:boolean;
pathname ?:string;
namespace:string;
}
export interface MetaInformation {
serviceName:string;
methodName:string;
serviceNameSpace:string;
extra:any;
error?: Error;
}
export interface Plugin {
name:string;
beforeChain < M extends MetaInformation > (args:Array < any >, metaInfo:M):Array < any > ;
afterChain < T, M extends MetaInformation > (result:T, metaInfo:M):T;
}
export function addService < T extends Service >(service:T):T;
export function addPlugin < T extends Plugin >(plugin:T):void;