From 3ec86215aa444ca34f19e1a7dba434e0c46791a0 Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 18 Dec 2014 13:32:47 +1300 Subject: [PATCH 1/2] Fix tests to check config from base `rest.wrap` --- rest/rest-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/rest-tests.ts b/rest/rest-tests.ts index 4ffe17d21d..b19416c119 100644 --- a/rest/rest-tests.ts +++ b/rest/rest-tests.ts @@ -15,7 +15,7 @@ client({ path: '/data.json' }).then(function(response) { console.log('response: ', response); }); -client = rest.wrap(mime).wrap(errorCode, { code: 500 }); +client = rest.wrap(mime, { mime: 'application/json' }).wrap(errorCode, { code: 500 }); client({ path: '/data.json' }).then( function(response) { console.log('response: ', response); From 1b41dcf72130bbbf78bffa197502db05f294af78 Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 18 Dec 2014 13:33:23 +1300 Subject: [PATCH 2/2] Fix allowing config passed in to `rest.wrap` --- rest/rest.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/rest.d.ts b/rest/rest.d.ts index 34ffc3bf21..3bec656c33 100644 --- a/rest/rest.d.ts +++ b/rest/rest.d.ts @@ -14,7 +14,7 @@ declare module "rest" { function rest(request: rest.Request): rest.ResponsePromise; module rest { - export function wrap(interceptor: Interceptor): Client; + export function wrap(interceptor: Interceptor, config?: any): Client; export interface Request { method?: string;