mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
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:
8
jquery-mockjax/jquery-mockjax.d.ts
vendored
8
jquery-mockjax/jquery-mockjax.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user