Skip to content

Commit

Permalink
TS updated app() to use Package not HandlerFunction #137
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Stawecki committed Mar 27, 2020
1 parent 1636a89 commit 4d94126
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ export declare interface RegisterOptions {
prefix?: string;
}

export type Package = any;

export declare interface App {
[namespace: string]: any;
[namespace: string]: Package;
}

export declare type Middleware = (req: Request, res: Response, next: () => void) => void;
Expand Down Expand Up @@ -186,8 +188,8 @@ export declare class Response {
}

export declare class API {
app(namespace: string, handler: HandlerFunction): App;
app(options: App): App;
app(namespace: string, package: Package): App;
app(packages: App): App;

get(path: string, ...handler: HandlerFunction[]): void;
get(...handler: HandlerFunction[]): void;
Expand Down

0 comments on commit 4d94126

Please sign in to comment.