Skip to content

Commit

Permalink
docs: d.ts of resources& logger (#2079)
Browse files Browse the repository at this point in the history
  • Loading branch information
x22x22 authored and dead-horse committed Feb 3, 2018
1 parent bbfacc5 commit 03a8944
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ declare class BaseContextClass { // tslint:disable-line
}

export interface Logger {
info(info: string, ...args: string[]): void;
warn(info: string, ...args: string[]): void;
debug(info: string, ...args: string[]): void;
error(info: string | Error, ...args: string[]): void;
info(info: string, ...args: any[]): void;
warn(info: string, ...args: any[]): void;
debug(info: string, ...args: any[]): void;
error(info: string | Error, ...args: any[]): void;
}

export type RequestArrayBody = any[];
Expand Down Expand Up @@ -523,6 +523,7 @@ export interface Application extends EggApplication {
* restful router api
*/
resources(name: string, prefix: string, fn: string): Router;
resources(path: string, prefix: string, ...middleware: any[]): Router;

redirect(path: string, redirectPath: string): void;

Expand Down

0 comments on commit 03a8944

Please sign in to comment.