mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Add definitions for methods to change the default rest client
This commit is contained in:
Vendored
+28
@@ -14,6 +14,10 @@ declare module "rest" {
|
||||
function rest(request: rest.Request): rest.ResponsePromise;
|
||||
|
||||
module rest {
|
||||
export function setDefaultClient(client: Client): void;
|
||||
export function getDefaultClient(): Client;
|
||||
export function resetDefaultClient(): void;
|
||||
|
||||
export function wrap<T>(interceptor: Interceptor<T>, config?: T): Client;
|
||||
|
||||
export interface Request {
|
||||
@@ -319,3 +323,27 @@ declare module "rest/mime/registry" {
|
||||
|
||||
export = registry;
|
||||
}
|
||||
|
||||
declare module "rest/client/xhr" {
|
||||
import rest = require("rest");
|
||||
var xhr: rest.Client;
|
||||
export = xhr;
|
||||
}
|
||||
|
||||
declare module "rest/client/node" {
|
||||
import rest = require("rest");
|
||||
var node: rest.Client;
|
||||
export = node;
|
||||
}
|
||||
|
||||
declare module "rest/client/jsonp" {
|
||||
import rest = require("rest");
|
||||
var jsonp: rest.Client;
|
||||
export = jsonp;
|
||||
}
|
||||
|
||||
declare module "rest/client/xdr" {
|
||||
import rest = require("rest");
|
||||
var xdr: rest.Client;
|
||||
export = xdr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user