Skip to content

Commit

Permalink
Merge pull request #157 from buuug7/master
Browse files Browse the repository at this point in the history
updated typescript definitions, fix types/index.ts, make the type hint support more argument for koa-unless, such as `custom, ext, method
  • Loading branch information
niftylettuce authored May 15, 2020
2 parents c680e0c + a8ace36 commit 7454df4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ declare namespace jwt {
export type SecretLoader = (header: any, payload: any) => Promise<string | string[] | Buffer | Buffer[]>;

export interface Middleware extends Koa.Middleware {
unless(params?: { path: string | string[] | RegExp | RegExp[] }): Koa.Middleware;
unless(params?: {custom?: (ctx: Koa.Context) => boolean, path?: string | string[] | RegExp | RegExp[], ext?: string | string[], method?: string | string[]}): Koa.Middleware;
}
}

0 comments on commit 7454df4

Please sign in to comment.