Skip to content

Commit

Permalink
Merge pull request #50 from nlac/3.0
Browse files Browse the repository at this point in the history
added type definition file for typescript
  • Loading branch information
jmdobry committed Apr 27, 2016
2 parents 5c69399 + 6be2435 commit d6eba66
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions dist/js-data-http.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
declare module JSDataHttp {

interface IDict {
[key: string]: any;
}

interface IActionOpts {
adapter?: string,
pathname?: string,
request?: Function,
response?: Function,
responseError?: Function
}

interface IBaseHttpAdapter {
basePath?: string,
suffix?: string,
debug?: boolean,
forceTrailingSlash?: boolean,
useFetch?: boolean
http?: any,
httpConfig?: IDict
}

export class HttpAdapter implements IBaseHttpAdapter {

static version: {
full?: string,
minor?: string,
major?: string,
patch?: string,
alpha?: string | boolean,
beta?: string | boolean
}
static addAction(name: string, opts: IActionOpts): Function
static addActions(opts?: {[key:string]: IActionOpts}): Function
static extend(instanceProps?: IDict, classProps?: IDict): HttpAdapter

constructor(opts: IBaseHttpAdapter)
}
}

declare module 'js-data-http' {
export = JSDataHttp.HttpAdapter
}

0 comments on commit d6eba66

Please sign in to comment.