From 180515d68f03853384c63c13c540f7097d230c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20=C4=90oki=C4=87?= Date: Mon, 28 Dec 2015 21:07:02 +0100 Subject: [PATCH] Define headers in MockJaxSettings as MockJaxSettingsHeaders interface in order to have better type safety. Define responseText as string or Object (instead of just string). --- jquery-mockjax/jquery-mockjax.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jquery-mockjax/jquery-mockjax.d.ts b/jquery-mockjax/jquery-mockjax.d.ts index a3045b503..a86bd856c 100644 --- a/jquery-mockjax/jquery-mockjax.d.ts +++ b/jquery-mockjax/jquery-mockjax.d.ts @@ -5,11 +5,15 @@ /// +interface MockJaxSettingsHeaders { + [key: string]: string; +} + interface MockJaxSettings { url?: string | RegExp; data?: any; type?: string; - headers?: any; + headers?: MockJaxSettingsHeaders; logging?: boolean; status?: number; statusText?: string; @@ -17,7 +21,7 @@ interface MockJaxSettings { isTimeout?: boolean; contentType?: string; response?: (settings: any) => void; - responseText?: string; + responseText?: string | Object; responseXml?: string; proxy?: string; proxyType?: string;