From 66caba378a46f5a9af933c0abf0e32c269532fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B0=8F=E8=81=AA?= <xiaohuoni@users.noreply.github.com> Date: Tue, 2 Apr 2019 11:26:40 +0800 Subject: [PATCH] Update index.d.ts --- src/index.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index 5cb4f9d..a145b71 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,7 +1,9 @@ -import { ResponseError } from "./utils"; - export type ResponseType = 'json' | 'text' | 'blob' | 'arrayBuffer' | 'formData'; - +export interface ResponseError<D = any> extends Error { + name: string; + data: D; + response: Response; +} /** * 增加的参数 * @param {string} requestType post类型, 用来简化写content-Type, 默认json