-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
37 lines (28 loc) · 855 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import * as React from "react";
import { AxiosResponse } from "axios";
interface ApisProps {
[key: string]: any;
}
interface ConnectApiProps {
scope: string | string[];
isScope?: boolean;
resultMode?: string;
}
interface ProviderProps {
apis: Record<string, unknown>;
context?: any;
children?: React.ReactNode;
}
export interface ConfigProps {
resultMode?: string;
prefix?: string;
adapter?: (config: any) => Promise<void | AxiosResponse<any, any>>;
}
export declare function combineApi(apis: ApisProps, isScope?: boolean): any;
export declare function connectApi(
WrapperComponent: React.Component | string | string[],
scope?: string | string[] | ConnectApiProps
): any;
export declare function ProviderApi(obj: ProviderProps): any;
declare function http(apis: ApisProps, config?: ConfigProps): any;
export default http;