Skip to content

Commit

Permalink
docs(index.d.ts): curl 增加泛型 (#3197)
Browse files Browse the repository at this point in the history
  • Loading branch information
forthedamn authored and dead-horse committed Nov 16, 2018
1 parent d40124a commit a43fef4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ declare module 'egg' {
* Keep the same api with httpclient.request(url, args).
* See https://github.com/node-modules/urllib#api-doc for more details.
*/
curl(url: string, opt?: RequestOptions): Promise<any>;
curl<T = any>(url: string, opt?: RequestOptions): Promise<T>;

/**
* Get logger by name, it's equal to app.loggers['name'], but you can extend it with your own logical
Expand Down Expand Up @@ -890,7 +890,7 @@ declare module 'egg' {
* Keep the same api with httpclient.request(url, args).
* See https://github.com/node-modules/urllib#api-doc for more details.
*/
curl(url: string, opt?: RequestOptions): Promise<any>;
curl<T = any>(url: string, opt?: RequestOptions): Promise<T>;

/**
* Render a file by view engine
Expand Down

0 comments on commit a43fef4

Please sign in to comment.