forked from jbaroudi/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qajax.d.ts
27 lines (20 loc) · 1020 Bytes
/
qajax.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
// Type definitions for Qajax
// Project: https://github.com/gre/qajax
// Definitions by: Boltmade <https://github.com/Boltmade>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../q/Q.d.ts" />
declare function Qajax(url : string) : Q.Promise<XMLHttpRequest>;
declare function Qajax(options : any) : Q.Promise<XMLHttpRequest>;
declare function Qajax(url : string, options : any) : Q.Promise<XMLHttpRequest>;
declare module Qajax {
export var defaults : any;
export function filterStatus(validStatus : number) : (xhr : XMLHttpRequest) => Q.Promise<XMLHttpRequest>;
export function filterStatus(validStatus : (status : number) => boolean) : (xhr : XMLHttpRequest) => Q.Promise<XMLHttpRequest>;
export function filterSuccess() : Q.Promise<XMLHttpRequest>;
export function toJSON(xhr : XMLHttpRequest) : Q.Promise<any>;
export function getJSON(url : string) : Q.Promise<any>;
export function serialize(paramsObj : any) : string;
}
declare module "qajax" {
export = Qajax;
}