Define headers in MockJaxSettings as MockJaxSettingsHeaders interface in order to have better type safety.

Define responseText as string or Object (instead of just string).
This commit is contained in:
Vladimir Đokić
2015-12-28 21:07:02 +01:00
parent 85e3e60db3
commit 180515d68f

View File

@@ -5,11 +5,15 @@
/// <reference path="../jquery/jquery.d.ts" />
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;