From ff6a2c9aada6cba327ebbe212bee47f9484f6f6a Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Tue, 28 Apr 2020 10:17:14 +0800 Subject: [PATCH] change network response data type --- doric-js/index.d.ts | 2 +- doric-js/lib/src/native/network.d.ts | 2 +- doric-js/src/native/network.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doric-js/index.d.ts b/doric-js/index.d.ts index 1ffc6adc..c5dd6347 100644 --- a/doric-js/index.d.ts +++ b/doric-js/index.d.ts @@ -795,7 +795,7 @@ declare module 'doric/lib/src/native/network' { timeout?: number; } export interface IResponse { - data: any; + data: string; status: number; headers?: { [index: string]: string; diff --git a/doric-js/lib/src/native/network.d.ts b/doric-js/lib/src/native/network.d.ts index 578e0d83..cd0485a0 100644 --- a/doric-js/lib/src/native/network.d.ts +++ b/doric-js/lib/src/native/network.d.ts @@ -12,7 +12,7 @@ export interface IRequest { timeout?: number; } export interface IResponse { - data: any; + data: string; status: number; headers?: { [index: string]: string; diff --git a/doric-js/src/native/network.ts b/doric-js/src/native/network.ts index bd0d59d3..6e07dc15 100644 --- a/doric-js/src/native/network.ts +++ b/doric-js/src/native/network.ts @@ -35,7 +35,7 @@ export interface IRequest { export interface IResponse { // `data` is the response that was provided by the server - data: any, + data: string, // `status` is the HTTP status code from the server response status: number, // `headers` the headers that the server responded with