Skip to content

Commit 5397a1c

Browse files
authored
Merge pull request #41 from deepeshhmehta/master
adding typescript definition for hooks
2 parents 742876f + a08e8d8 commit 5397a1c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,14 @@ declare namespace fastgateway {
3030
target: string;
3131
methods?: Method[];
3232
middlewares?: Function[];
33-
hooks?: {};
33+
hooks?: Hooks;
3434
}
3535

36+
interface Hooks {
37+
onRequest?: Function,
38+
rewriteHeaders?: Function,
39+
onResponse?: Function,
40+
}
3641
interface Options<P extends restana.Protocol> {
3742
server?: restana.Server<P>;
3843
restana?: {};

0 commit comments

Comments
 (0)