1- declare module JSDataHttp {
2-
3- interface IDict {
4- [ key : string ] : any ;
5- }
6-
7- interface IActionOpts {
8- adapter ?: string ,
9- pathname ?: string ,
10- request ?: Function ,
11- response ?: Function ,
12- responseError ?: Function
13- }
14-
15- interface IBaseHttpAdapter {
16- basePath ?: string ,
17- suffix ?: string ,
18- debug ?: boolean ,
19- forceTrailingSlash ?: boolean ,
20- useFetch ?: boolean
21- http ?: any ,
22- httpConfig ?: IDict
23- }
24-
25- export class HttpAdapter implements IBaseHttpAdapter {
1+ import { Adapter } from 'js-data-adapter'
262
27- static version : {
28- full ?: string ,
29- minor ?: string ,
30- major ?: string ,
31- patch ?: string ,
32- alpha ?: string | boolean ,
33- beta ?: string | boolean
34- }
35- static addAction ( name : string , opts : IActionOpts ) : Function
36- static addActions ( opts ?: { [ key :string ] : IActionOpts } ) : Function
37- static extend ( instanceProps ?: IDict , classProps ?: IDict ) : HttpAdapter
38-
39- constructor ( opts : IBaseHttpAdapter )
40- }
3+ interface IDict {
4+ [ key : string ] : any ;
5+ }
6+ interface IActionOpts {
7+ adapter ?: string ,
8+ pathname ?: string ,
9+ request ?: Function ,
10+ response ?: Function ,
11+ responseError ?: Function
12+ }
13+ interface IBaseAdapter extends IDict {
14+ debug ?: boolean ,
15+ raw ?: boolean
16+ }
17+ interface IBaseHttpAdapter extends IBaseAdapter {
18+ basePath ?: string
19+ forceTrailingSlash ?: boolean
20+ http ?: any
21+ httpConfig ?: IDict
22+ suffix ?: string
23+ useFetch ?: boolean
24+ }
25+ export function addAction ( name : string , opts : IActionOpts ) : Function
26+ export function addActions ( opts ?: { [ key :string ] : IActionOpts } ) : Function
27+ export class HttpAdapter extends Adapter {
28+ static version : {
29+ full ?: string
30+ minor ?: string
31+ major ?: string
32+ patch ?: string
33+ alpha ?: string | boolean
34+ beta ?: string | boolean
35+ }
36+ static extend ( instanceProps ?: IDict , classProps ?: IDict ) : typeof HttpAdapter
37+ constructor ( opts ?: IBaseHttpAdapter )
4138}
42-
43- declare module 'js-data-http' {
44- export = JSDataHttp . HttpAdapter
45- }
0 commit comments