legacy.d.ts 7.3 KB

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