From b5cc8b6e361b1ac2e7b4eb509f1e6486fe1dab13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=AE=87=E8=88=AA?= <591765099@qq.com> Date: Mon, 25 May 2020 23:15:38 +0800 Subject: [PATCH] fix(dts): fix curl type (#4312) Co-authored-by: huyuhang --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 4d9afde32e..a5fb422aa6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -563,7 +563,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; + curl: EggHttpClient['request']; /** * Get logger by name, it's equal to app.loggers['name'], but you can extend it with your own logical @@ -908,7 +908,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; + curl: EggHttpClient['request']; __(key: string, ...values: string[]): string; gettext(key: string, ...values: string[]): string;