Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/taro/types/api/network/request.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Taro from '../../index'

declare module '../../index' {
namespace request {
interface Option<T = any, U extends string | TaroGeneral.IAnyObject | ArrayBuffer = any | any> {
interface Option<T = any, U = any> {
/** 开发者服务器接口地址 */
url: string
/** 请求的参数 */
Expand Down Expand Up @@ -150,8 +150,7 @@ declare module '../../index' {
storeCheck?(): boolean
}

interface SuccessCallbackResult<T extends string | TaroGeneral.IAnyObject | ArrayBuffer = any | any>
extends TaroGeneral.CallbackResult {
interface SuccessCallbackResult<T = any> extends TaroGeneral.CallbackResult {
/** 开发者服务器返回的数据 */
data: T
/** 开发者服务器返回的 HTTP Response Header */
Expand Down Expand Up @@ -379,6 +378,11 @@ declare module '../../index' {
}
}

/** @ignore */
interface RequestParams<T = any> extends request.Option<T, any> {
[propName: string]: any
}

/** @ignore */
type interceptor = (chain: Chain) => any

Expand Down