Skip to content

Commit

Permalink
docs: add serverTimeout to d.ts (#3200)
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 authored and dead-horse committed Nov 16, 2018
1 parent a43fef4 commit db999d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,15 @@ declare module 'egg' {

onClientError(err: Error, socket: Socket, app: EggApplication): ClientErrorResponse | Promise<ClientErrorResponse>;

/**
* server timeout in milliseconds, default to 2 minutes.
*
* for special request, just use `ctx.req.setTimeout(ms)`
*
* @see https://nodejs.org/api/http.html#http_server_timeout
*/
serverTimeout: number | null;

[prop: string]: any;
}

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/apps/app-ts/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export default {
keys: 'foo',
serverTimeout: 2 * 60 * 1000,
}

0 comments on commit db999d3

Please sign in to comment.