UNPKG

7.29 kBTypeScriptView Raw
1// tslint:disable:no-irregular-whitespace
2
3// tslint:disable-next-line:no-empty-interface
4interface JQueryCallback extends JQuery.Callbacks { }
5interface JQueryDeferred<T> extends JQuery.Deferred<T> { }
6// tslint:disable-next-line:no-empty-interface
7interface JQueryEventConstructor extends JQuery.EventStatic { }
8interface JQueryDeferred<T> extends JQuery.Deferred<T> { }
9// tslint:disable-next-line:no-empty-interface
10interface JQueryAjaxSettings extends JQuery.AjaxSettings { }
11interface JQueryAnimationOptions extends JQuery.EffectsOptions<Element> { }
12// tslint:disable-next-line:no-empty-interface
13interface JQueryCoordinates extends JQuery.Coordinates { }
14interface JQueryGenericPromise<T> extends JQuery.Thenable<T> { }
15// tslint:disable-next-line:no-empty-interface
16interface JQueryXHR extends JQuery.jqXHR { }
17interface JQueryPromise<T> extends JQuery.Promise<T> { }
18// tslint:disable-next-line:no-empty-interface
19interface JQuerySerializeArrayElement extends JQuery.NameValuePair { }
20
21/**
22 * @deprecated ​ Deprecated since 1.9. See \`{@link https://api.jquery.com/jQuery.support/ }\`.
23 */
24// tslint:disable-next-line:no-empty-interface
25interface JQuerySupport extends JQuery.PlainObject { }
26
27// Legacy types that are not represented in the current type definitions are marked deprecated.
28
29/**
30 * @deprecated ​ Deprecated. Use \`{@link JQuery.Deferred.Callback }\` or \`{@link JQuery.Deferred.CallbackBase }\`.
31 */
32interface JQueryPromiseCallback<T> {
33 (value?: T, ...args: any[]): void;
34}
35/**
36 * @deprecated ​ Deprecated. Use \`{@link JQueryStatic.param JQueryStatic&#91;'param'&#93;}\`.
37 */
38interface JQueryParam {
39 /**
40 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
41 * @param obj An array or object to serialize.
42 * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
43 */
44 (obj: any, traditional?: boolean): string;
45}
46/**
47 * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`.
48 */
49interface BaseJQueryEventObject extends Event {
50 /**
51 * The current DOM element within the event bubbling phase.
52 * @see \`{@link https://api.jquery.com/event.currentTarget/ }\`
53 */
54 currentTarget: Element;
55 /**
56 * An optional object of data passed to an event method when the current executing handler is bound.
57 * @see \`{@link https://api.jquery.com/event.data/ }\`
58 */
59 data: any;
60 /**
61 * The element where the currently-called jQuery event handler was attached.
62 * @see \`{@link https://api.jquery.com/event.delegateTarget/ }\`
63 */
64 delegateTarget: Element;
65 /**
66 * Returns whether event.preventDefault() was ever called on this event object.
67 * @see \`{@link https://api.jquery.com/event.isDefaultPrevented/ }\`
68 */
69 isDefaultPrevented(): boolean;
70 /**
71 * Returns whether event.stopImmediatePropagation() was ever called on this event object.
72 * @see \`{@link https://api.jquery.com/event.isImmediatePropagationStopped/ }\`
73 */
74 isImmediatePropagationStopped(): boolean;
75 /**
76 * Returns whether event.stopPropagation() was ever called on this event object.
77 * @see \`{@link https://api.jquery.com/event.isPropagationStopped/ }\`
78 */
79 isPropagationStopped(): boolean;
80 /**
81 * The namespace specified when the event was triggered.
82 * @see \`{@link https://api.jquery.com/event.namespace/ }\`
83 */
84 namespace: string;
85 /**
86 * The browser's original Event object.
87 * @see \`{@link https://api.jquery.com/category/events/event-object/ }\`
88 */
89 originalEvent: Event;
90 /**
91 * If this method is called, the default action of the event will not be triggered.
92 * @see \`{@link https://api.jquery.com/event.preventDefault/ }\`
93 */
94 preventDefault(): any;
95 /**
96 * The other DOM element involved in the event, if any.
97 * @see \`{@link https://api.jquery.com/event.relatedTarget/ }\`
98 */
99 relatedTarget: Element;
100 /**
101 * The last value returned by an event handler that was triggered by this event, unless the value was undefined.
102 * @see \`{@link https://api.jquery.com/event.result/ }\`
103 */
104 result: any;
105 /**
106 * Keeps the rest of the handlers from being executed and prevents the event from bubbling up the DOM tree.
107 * @see \`{@link https://api.jquery.com/event.stopImmediatePropagation/ }\`
108 */
109 stopImmediatePropagation(): void;
110 /**
111 * Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
112 * @see \`{@link https://api.jquery.com/event.stopPropagation/ }\`
113 */
114 stopPropagation(): void;
115 /**
116 * The DOM element that initiated the event.
117 * @see \`{@link https://api.jquery.com/event.target/ }\`
118 */
119 target: Element;
120 /**
121 * The mouse position relative to the left edge of the document.
122 * @see \`{@link https://api.jquery.com/event.pageX/ }\`
123 */
124 pageX: number;
125 /**
126 * The mouse position relative to the top edge of the document.
127 * @see \`{@link https://api.jquery.com/event.pageY/ }\`
128 */
129 pageY: number;
130 /**
131 * For key or mouse events, this property indicates the specific key or button that was pressed.
132 * @see \`{@link https://api.jquery.com/event.which/ }\`
133 */
134 which: number;
135 /**
136 * Indicates whether the META key was pressed when the event fired.
137 * @see \`{@link https://api.jquery.com/event.metaKey/ }\`
138 */
139 metaKey: boolean;
140}
141/**
142 * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`.
143 */
144interface JQueryInputEventObject extends BaseJQueryEventObject {
145 altKey: boolean;
146 ctrlKey: boolean;
147 metaKey: boolean;
148 shiftKey: boolean;
149}
150/**
151 * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`.
152 */
153interface JQueryMouseEventObject extends JQueryInputEventObject {
154 button: number;
155 clientX: number;
156 clientY: number;
157 offsetX: number;
158 offsetY: number;
159 pageX: number;
160 pageY: number;
161 screenX: number;
162 screenY: number;
163}
164/**
165 * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`.
166 */
167interface JQueryKeyEventObject extends JQueryInputEventObject {
168 /** @deprecated */
169 char: string;
170 /** @deprecated */
171 charCode: number;
172 key: string;
173 /** @deprecated */
174 keyCode: number;
175}
176/**
177 * @deprecated ​ Deprecated. Use \`{@link JQuery.Event }\`.
178 */
179interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { }
180/**
181 * @deprecated ​ Deprecated.
182 */
183interface JQueryPromiseOperator<T, U> {
184 (callback1: JQuery.TypeOrArray<JQueryPromiseCallback<T>>,
185 ...callbacksN: Array<JQuery.TypeOrArray<JQueryPromiseCallback<any>>>): JQueryPromise<U>;
186}
187/**
188 * @deprecated ​ Deprecated. Internal. See \`{@link https://github.com/jquery/api.jquery.com/issues/912 }\`.
189 */
190interface JQueryEasingFunction {
191 (percent: number): number;
192}
193/**
194 * @deprecated ​ Deprecated. Internal. See \`{@link https://github.com/jquery/api.jquery.com/issues/912 }\`.
195 */
196interface JQueryEasingFunctions {
197 [name: string]: JQueryEasingFunction;
198 linear: JQueryEasingFunction;
199 swing: JQueryEasingFunction;
200}