UNPKG

119 kBTypeScriptView Raw
1/// <reference types="chai" />
2/// <reference types="jquery" />
3
4declare namespace Chai {
5 interface Assertion {
6 attr(name: string, value?: string): Assertion;
7 prop(name: string, value?: any): Assertion;
8 css(name: string, value?: string): Assertion;
9 data(name: string, value?: string): Assertion;
10 class(className: string): Assertion;
11 id(id: string): Assertion;
12 html(html: string): Assertion;
13 text(text: string): Assertion;
14 value(text: string): Assertion;
15 descendants(selector: string): Assertion;
16 visible(): Assertion;
17 hidden(): Assertion;
18 selected(): Assertion;
19 checked(): Assertion;
20 disabled(): Assertion;
21 enabled(): Assertion;
22 (selector: string): Assertion;
23 }
24
25 interface Match {
26 (selector: string): Assertion;
27 }
28}
29
30/**
31 * Static members of chai-jquery (those on $ and jQuery themselves)
32 */
33interface ChaiJQueryStatic {
34 /**
35 * Perform an asynchronous HTTP (Ajax) request.
36 *
37 * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
38 */
39 ajax(settings: JQueryAjaxSettings): JQueryXHR;
40 /**
41 * Perform an asynchronous HTTP (Ajax) request.
42 *
43 * @param url A string containing the URL to which the request is sent.
44 * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
45 */
46 ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
47
48 /**
49 * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
50 *
51 * @param dataTypes An optional string containing one or more space-separated dataTypes
52 * @param handler A handler to set default values for future Ajax requests.
53 */
54 ajaxPrefilter(
55 dataTypes: string,
56 handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any,
57 ): void;
58 /**
59 * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
60 *
61 * @param handler A handler to set default values for future Ajax requests.
62 */
63 ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
64
65 ajaxSettings: JQueryAjaxSettings;
66
67 /**
68 * Set default values for future Ajax requests. Its use is not recommended.
69 *
70 * @param options A set of key/value pairs that configure the default Ajax request. All options are optional.
71 */
72 ajaxSetup(options: JQueryAjaxSettings): void;
73
74 /**
75 * Load data from the server using a HTTP GET request.
76 *
77 * @param url A string containing the URL to which the request is sent.
78 * @param success A callback function that is executed if the request succeeds.
79 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
80 */
81 get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
82 /**
83 * Load data from the server using a HTTP GET request.
84 *
85 * @param url A string containing the URL to which the request is sent.
86 * @param data A plain object or string that is sent to the server with the request.
87 * @param success A callback function that is executed if the request succeeds.
88 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
89 */
90 get(
91 url: string,
92 data?: Object | string,
93 success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any,
94 dataType?: string,
95 ): JQueryXHR;
96 /**
97 * Load JSON-encoded data from the server using a GET HTTP request.
98 *
99 * @param url A string containing the URL to which the request is sent.
100 * @param success A callback function that is executed if the request succeeds.
101 */
102 getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
103 /**
104 * Load JSON-encoded data from the server using a GET HTTP request.
105 *
106 * @param url A string containing the URL to which the request is sent.
107 * @param data A plain object or string that is sent to the server with the request.
108 * @param success A callback function that is executed if the request succeeds.
109 */
110 getJSON(
111 url: string,
112 data?: Object | string,
113 success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any,
114 ): JQueryXHR;
115 /**
116 * Load a JavaScript file from the server using a GET HTTP request, then execute it.
117 *
118 * @param url A string containing the URL to which the request is sent.
119 * @param success A callback function that is executed if the request succeeds.
120 */
121 getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
122
123 /**
124 * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
125 */
126 param: JQueryParam;
127
128 /**
129 * Load data from the server using a HTTP POST request.
130 *
131 * @param url A string containing the URL to which the request is sent.
132 * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
133 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
134 */
135 post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
136 /**
137 * Load data from the server using a HTTP POST request.
138 *
139 * @param url A string containing the URL to which the request is sent.
140 * @param data A plain object or string that is sent to the server with the request.
141 * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
142 * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
143 */
144 post(
145 url: string,
146 data?: Object | string,
147 success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any,
148 dataType?: string,
149 ): JQueryXHR;
150
151 /**
152 * A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
153 *
154 * @param flags An optional list of space-separated flags that change how the callback list behaves.
155 */
156 Callbacks(flags?: string): JQueryCallback;
157
158 /**
159 * Holds or releases the execution of jQuery's ready event.
160 *
161 * @param hold Indicates whether the ready hold is being requested or released
162 */
163 holdReady(hold: boolean): void;
164
165 /**
166 * Accepts a string containing a CSS selector which is then used to match a set of elements.
167 *
168 * @param selector A string containing a selector expression
169 * @param context A DOM Element, Document, or jQuery to use as context
170 */
171 (selector: string, context?: Element | JQuery): ChaiJQuery;
172 /**
173 * Accepts a string containing a CSS selector which is then used to match a set of elements.
174 *
175 * @param element A DOM element to wrap in a jQuery object.
176 */
177 (element: Element): ChaiJQuery;
178 /**
179 * Accepts a string containing a CSS selector which is then used to match a set of elements.
180 *
181 * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
182 */
183 (elementArray: Element[]): ChaiJQuery;
184 /**
185 * Accepts a string containing a CSS selector which is then used to match a set of elements.
186 *
187 * @param object A plain object to wrap in a jQuery object.
188 */
189 (object: {}): ChaiJQuery;
190 /**
191 * Accepts a string containing a CSS selector which is then used to match a set of elements.
192 *
193 * @param object An existing jQuery object to clone.
194 */
195 (object: JQuery): ChaiJQuery;
196 /**
197 * Specify a function to execute when the DOM is fully loaded.
198 */
199 (): ChaiJQuery;
200
201 /**
202 * Creates DOM elements on the fly from the provided string of raw HTML.
203 *
204 * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML.
205 * @param ownerDocument A document in which the new elements will be created.
206 */
207 (html: string, ownerDocument?: Document): ChaiJQuery;
208 /**
209 * Creates DOM elements on the fly from the provided string of raw HTML.
210 *
211 * @param html A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>).
212 * @param attributes An object of attributes, events, and methods to call on the newly-created element.
213 */
214 (html: string, attributes: Object): ChaiJQuery;
215
216 /**
217 * Binds a function to be executed when the DOM has finished loading.
218 *
219 * @param callback A function to execute after the DOM is ready.
220 */
221 (callback: Function): ChaiJQuery;
222
223 /**
224 * Relinquish jQuery's control of the $ variable.
225 *
226 * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
227 */
228 noConflict(removeAll?: boolean): Object;
229
230 /**
231 * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
232 *
233 * @param deferreds One or more Deferred objects, or plain JavaScript objects.
234 */
235 when<T>(...deferreds: Array<T | JQueryPromise<T> /* as JQueryDeferred<T> */>): JQueryPromise<T>;
236
237 /**
238 * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
239 */
240 cssHooks: { [key: string]: any };
241 cssNumber: any;
242
243 /**
244 * Store arbitrary data associated with the specified element. Returns the value that was set.
245 *
246 * @param element The DOM element to associate with the data.
247 * @param key A string naming the piece of data to set.
248 * @param value The new data value.
249 */
250 data<T>(element: Element, key: string, value: T): T;
251 /**
252 * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
253 *
254 * @param element The DOM element to associate with the data.
255 * @param key A string naming the piece of data to set.
256 */
257 data(element: Element, key: string): any;
258 /**
259 * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
260 *
261 * @param element The DOM element to associate with the data.
262 */
263 data(element: Element): any;
264
265 /**
266 * Execute the next function on the queue for the matched element.
267 *
268 * @param element A DOM element from which to remove and execute a queued function.
269 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
270 */
271 dequeue(element: Element, queueName?: string): void;
272
273 /**
274 * Determine whether an element has any jQuery data associated with it.
275 *
276 * @param element A DOM element to be checked for data.
277 */
278 hasData(element: Element): boolean;
279
280 /**
281 * Show the queue of functions to be executed on the matched element.
282 *
283 * @param element A DOM element to inspect for an attached queue.
284 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
285 */
286 queue(element: Element, queueName?: string): any[];
287 /**
288 * Manipulate the queue of functions to be executed on the matched element.
289 *
290 * @param element A DOM element where the array of queued functions is attached.
291 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
292 * @param newQueue An array of functions to replace the current queue contents.
293 */
294 queue(element: Element, queueName: string, newQueue: Function[]): ChaiJQuery;
295 /**
296 * Manipulate the queue of functions to be executed on the matched element.
297 *
298 * @param element A DOM element on which to add a queued function.
299 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
300 * @param callback The new function to add to the queue.
301 */
302 queue(element: Element, queueName: string, callback: Function): ChaiJQuery;
303
304 /**
305 * Remove a previously-stored piece of data.
306 *
307 * @param element A DOM element from which to remove data.
308 * @param name A string naming the piece of data to remove.
309 */
310 removeData(element: Element, name?: string): ChaiJQuery;
311
312 /**
313 * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
314 *
315 * @param beforeStart A function that is called just before the constructor returns.
316 */
317 Deferred<T>(beforeStart?: (deferred: JQueryDeferred<T>) => any): JQueryDeferred<T>;
318
319 /**
320 * Effects
321 */
322 fx: {
323 tick: () => void;
324 /**
325 * The rate (in milliseconds) at which animations fire.
326 */
327 interval: number;
328 stop: () => void;
329 speeds: { slow: number; fast: number };
330 /**
331 * Globally disable all animations.
332 */
333 off: boolean;
334 step: any;
335 };
336
337 /**
338 * Takes a function and returns a new one that will always have a particular context.
339 *
340 * @param fnction The function whose context will be changed.
341 * @param context The object to which the context (this) of the function should be set.
342 * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument.
343 */
344 proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any;
345 /**
346 * Takes a function and returns a new one that will always have a particular context.
347 *
348 * @param context The object to which the context (this) of the function should be set.
349 * @param name The name of the function whose context will be changed (should be a property of the context object).
350 * @param additionalArguments Any number of arguments to be passed to the function named in the name argument.
351 */
352 proxy(context: Object, name: string, ...additionalArguments: any[]): any;
353
354 Event: JQueryEventConstructor;
355
356 /**
357 * Takes a string and throws an exception containing it.
358 *
359 * @param message The message to send out.
360 */
361 error(message: any): ChaiJQuery;
362
363 expr: any;
364 fn: any; // TODO: Decide how we want to type this
365
366 isReady: boolean;
367
368 // Properties
369 support: JQuerySupport;
370
371 /**
372 * Check to see if a DOM element is a descendant of another DOM element.
373 *
374 * @param container The DOM element that may contain the other element.
375 * @param contained The DOM element that may be contained by (a descendant of) the other element.
376 */
377 contains(container: Element, contained: Element): boolean;
378
379 /**
380 * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
381 *
382 * @param collection The object or array to iterate over.
383 * @param callback The function that will be executed on every object.
384 */
385 each<T>(
386 collection: T[],
387 callback: (indexInArray: number, valueOfElement: T) => any,
388 ): any;
389
390 /**
391 * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
392 *
393 * @param collection The object or array to iterate over.
394 * @param callback The function that will be executed on every object.
395 */
396 each(
397 collection: any,
398 callback: (indexInArray: any, valueOfElement: any) => any,
399 ): any;
400
401 /**
402 * Merge the contents of two or more objects together into the first object.
403 *
404 * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument.
405 * @param object1 An object containing additional properties to merge in.
406 * @param objectN Additional objects containing properties to merge in.
407 */
408 extend(target: any, object1?: any, ...objectN: any[]): any;
409 /**
410 * Merge the contents of two or more objects together into the first object.
411 *
412 * @param deep If true, the merge becomes recursive (aka. deep copy).
413 * @param target The object to extend. It will receive the new properties.
414 * @param object1 An object containing additional properties to merge in.
415 * @param objectN Additional objects containing properties to merge in.
416 */
417 extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any;
418
419 /**
420 * Execute some JavaScript code globally.
421 *
422 * @param code The JavaScript code to execute.
423 */
424 globalEval(code: string): any;
425
426 /**
427 * Finds the elements of an array which satisfy a filter function. The original array is not affected.
428 *
429 * @param array The array to search through.
430 * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value. this will be the global window object.
431 * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false.
432 */
433 grep<T>(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[];
434
435 /**
436 * Search for a specified value within an array and return its index (or -1 if not found).
437 *
438 * @param value The value to search for.
439 * @param array An array through which to search.
440 * @param fromIndex The index of the array at which to begin the search. The default is 0, which will search the whole array.
441 */
442 inArray<T>(value: T, array: T[], fromIndex?: number): number;
443
444 /**
445 * Determine whether the argument is an array.
446 *
447 * @param obj Object to test whether or not it is an array.
448 */
449 isArray(obj: any): boolean;
450 /**
451 * Check to see if an object is empty (contains no enumerable properties).
452 *
453 * @param obj The object that will be checked to see if it's empty.
454 */
455 isEmptyObject(obj: any): boolean;
456 /**
457 * Determine if the argument passed is a Javascript function object.
458 *
459 * @param obj Object to test whether or not it is a function.
460 */
461 isFunction(obj: any): boolean;
462 /**
463 * Determines whether its argument is a number.
464 *
465 * @param obj The value to be tested.
466 */
467 isNumeric(value: any): boolean;
468 /**
469 * Check to see if an object is a plain object (created using "{}" or "new Object").
470 *
471 * @param obj The object that will be checked to see if it's a plain object.
472 */
473 isPlainObject(obj: any): boolean;
474 /**
475 * Determine whether the argument is a window.
476 *
477 * @param obj Object to test whether or not it is a window.
478 */
479 isWindow(obj: any): boolean;
480 /**
481 * Check to see if a DOM node is within an XML document (or is an XML document).
482 *
483 * @param node The DOM node that will be checked to see if it's in an XML document.
484 */
485 isXMLDoc(node: Node): boolean;
486
487 /**
488 * Convert an array-like object into a true JavaScript array.
489 *
490 * @param obj Any object to turn into a native Array.
491 */
492 makeArray(obj: any): any[];
493
494 /**
495 * Translate all items in an array or object to new array of items.
496 *
497 * @param array The Array to translate.
498 * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.
499 */
500 map<T, U>(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[];
501 /**
502 * Translate all items in an array or object to new array of items.
503 *
504 * @param arrayOrObject The Array or Object to translate.
505 * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.
506 */
507 map(arrayOrObject: any, callback: (value: any, indexOrKey: any) => any): any;
508
509 /**
510 * Merge the contents of two arrays together into the first array.
511 *
512 * @param first The first array to merge, the elements of second added.
513 * @param second The second array to merge into the first, unaltered.
514 */
515 merge<T>(first: T[], second: T[]): T[];
516
517 /**
518 * An empty function.
519 */
520 noop(): any;
521
522 /**
523 * Return a number representing the current time.
524 */
525 now(): number;
526
527 /**
528 * Takes a well-formed JSON string and returns the resulting JavaScript object.
529 *
530 * @param json The JSON string to parse.
531 */
532 parseJSON(json: string): any;
533
534 /**
535 * Parses a string into an XML document.
536 *
537 * @param data a well-formed XML string to be parsed
538 */
539 parseXML(data: string): XMLDocument;
540
541 /**
542 * Remove the whitespace from the beginning and end of a string.
543 *
544 * @param str Remove the whitespace from the beginning and end of a string.
545 */
546 trim(str: string): string;
547
548 /**
549 * Determine the internal JavaScript [[Class]] of an object.
550 *
551 * @param obj Object to get the internal JavaScript [[Class]] of.
552 */
553 type(obj: any): string;
554
555 /**
556 * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
557 *
558 * @param array The Array of DOM elements.
559 */
560 unique(array: Element[]): Element[];
561
562 /**
563 * Parses a string into an array of DOM nodes.
564 *
565 * @param data HTML string to be parsed
566 * @param context DOM element to serve as the context in which the HTML fragment will be created
567 * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
568 */
569 parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[];
570
571 /**
572 * Parses a string into an array of DOM nodes.
573 *
574 * @param data HTML string to be parsed
575 * @param context DOM element to serve as the context in which the HTML fragment will be created
576 * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
577 */
578 parseHTML(data: string, context?: Document, keepScripts?: boolean): any[];
579}
580
581/**
582 * The chai-jquery instance members
583 */
584interface ChaiJQuery {
585 /**
586 * Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
587 *
588 * @param handler The function to be invoked.
589 */
590 ajaxComplete(
591 handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any,
592 ): ChaiJQuery;
593 /**
594 * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
595 *
596 * @param handler The function to be invoked.
597 */
598 ajaxError(
599 handler: (
600 event: JQueryEventObject,
601 jqXHR: JQueryXHR,
602 ajaxSettings: JQueryAjaxSettings,
603 thrownError: any,
604 ) => any,
605 ): ChaiJQuery;
606 /**
607 * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
608 *
609 * @param handler The function to be invoked.
610 */
611 ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): ChaiJQuery;
612 /**
613 * Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
614 *
615 * @param handler The function to be invoked.
616 */
617 ajaxStart(handler: () => any): ChaiJQuery;
618 /**
619 * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
620 *
621 * @param handler The function to be invoked.
622 */
623 ajaxStop(handler: () => any): ChaiJQuery;
624 /**
625 * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
626 *
627 * @param handler The function to be invoked.
628 */
629 ajaxSuccess(
630 handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any,
631 ): ChaiJQuery;
632
633 /**
634 * Load data from the server and place the returned HTML into the matched element.
635 *
636 * @param url A string containing the URL to which the request is sent.
637 * @param data A plain object or string that is sent to the server with the request.
638 * @param complete A callback function that is executed when the request completes.
639 */
640 load(
641 url: string,
642 data?: string | Object,
643 complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any,
644 ): ChaiJQuery;
645
646 /**
647 * Encode a set of form elements as a string for submission.
648 */
649 serialize(): string;
650 /**
651 * Encode a set of form elements as an array of names and values.
652 */
653 serializeArray(): JQuerySerializeArrayElement[];
654
655 /**
656 * Adds the specified class(es) to each of the set of matched elements.
657 *
658 * @param className One or more space-separated classes to be added to the class attribute of each matched element.
659 */
660 addClass(className: string): ChaiJQuery;
661 /**
662 * Adds the specified class(es) to each of the set of matched elements.
663 *
664 * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.
665 */
666 addClass(func: (index: number, className: string) => string): ChaiJQuery;
667
668 /**
669 * Add the previous set of elements on the stack to the current set, optionally filtered by a selector.
670 */
671 addBack(selector?: string): ChaiJQuery;
672
673 /**
674 * Get the value of an attribute for the first element in the set of matched elements.
675 *
676 * @param attributeName The name of the attribute to get.
677 */
678 attr(attributeName: string): string;
679 /**
680 * Set one or more attributes for the set of matched elements.
681 *
682 * @param attributeName The name of the attribute to set.
683 * @param value A value to set for the attribute.
684 */
685 attr(attributeName: string, value: string | number): ChaiJQuery;
686 /**
687 * Set one or more attributes for the set of matched elements.
688 *
689 * @param attributeName The name of the attribute to set.
690 * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.
691 */
692 attr(attributeName: string, func: (index: number, attr: string) => string | number): ChaiJQuery;
693 /**
694 * Set one or more attributes for the set of matched elements.
695 *
696 * @param attributes An object of attribute-value pairs to set.
697 */
698 attr(attributes: Object): ChaiJQuery;
699
700 /**
701 * Determine whether any of the matched elements are assigned the given class.
702 *
703 * @param className The class name to search for.
704 */
705 hasClass(className: string): boolean;
706
707 /**
708 * Get the HTML contents of the first element in the set of matched elements.
709 */
710 html(): string;
711 /**
712 * Set the HTML contents of each element in the set of matched elements.
713 *
714 * @param htmlString A string of HTML to set as the content of each matched element.
715 */
716 html(htmlString: string): ChaiJQuery;
717 /**
718 * Set the HTML contents of each element in the set of matched elements.
719 *
720 * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
721 */
722 html(func: (index: number, oldhtml: string) => string): ChaiJQuery;
723 /**
724 * Set the HTML contents of each element in the set of matched elements.
725 *
726 * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
727 */
728
729 /**
730 * Get the value of a property for the first element in the set of matched elements.
731 *
732 * @param propertyName The name of the property to get.
733 */
734 prop(propertyName: string): any;
735 /**
736 * Set one or more properties for the set of matched elements.
737 *
738 * @param propertyName The name of the property to set.
739 * @param value A value to set for the property.
740 */
741 prop(propertyName: string, value: string | number | boolean): ChaiJQuery;
742 /**
743 * Set one or more properties for the set of matched elements.
744 *
745 * @param properties An object of property-value pairs to set.
746 */
747 prop(properties: Object): ChaiJQuery;
748 /**
749 * Set one or more properties for the set of matched elements.
750 *
751 * @param propertyName The name of the property to set.
752 * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.
753 */
754 prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): ChaiJQuery;
755
756 /**
757 * Remove an attribute from each element in the set of matched elements.
758 *
759 * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.
760 */
761 removeAttr(attributeName: string): ChaiJQuery;
762
763 /**
764 * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
765 *
766 * @param className One or more space-separated classes to be removed from the class attribute of each matched element.
767 */
768 removeClass(className?: string): ChaiJQuery;
769 /**
770 * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
771 *
772 * @param function A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.
773 */
774 removeClass(func: (index: number, className: string) => string): ChaiJQuery;
775
776 /**
777 * Remove a property for the set of matched elements.
778 *
779 * @param propertyName The name of the property to remove.
780 */
781 removeProp(propertyName: string): ChaiJQuery;
782
783 /**
784 * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
785 *
786 * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set.
787 * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
788 */
789 toggleClass(className: string, swtch?: boolean): ChaiJQuery;
790 /**
791 * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
792 *
793 * @param swtch A boolean value to determine whether the class should be added or removed.
794 */
795 toggleClass(swtch?: boolean): ChaiJQuery;
796 /**
797 * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
798 *
799 * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.
800 * @param swtch A boolean value to determine whether the class should be added or removed.
801 */
802 toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): ChaiJQuery;
803
804 /**
805 * Get the current value of the first element in the set of matched elements.
806 */
807 val(): any;
808 /**
809 * Set the value of each element in the set of matched elements.
810 *
811 * @param value A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked.
812 */
813 val(value: string | string[]): ChaiJQuery;
814 /**
815 * Set the value of each element in the set of matched elements.
816 *
817 * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
818 */
819 val(func: (index: number, value: string) => string): ChaiJQuery;
820
821 /**
822 * Get the value of style properties for the first element in the set of matched elements.
823 *
824 * @param propertyName A CSS property.
825 */
826 css(propertyName: string): string;
827 /**
828 * Set one or more CSS properties for the set of matched elements.
829 *
830 * @param propertyName A CSS property name.
831 * @param value A value to set for the property.
832 */
833 css(propertyName: string, value: string | number): ChaiJQuery;
834 /**
835 * Set one or more CSS properties for the set of matched elements.
836 *
837 * @param propertyName A CSS property name.
838 * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
839 */
840 css(propertyName: string, value: (index: number, value: string) => string | number): ChaiJQuery;
841 /**
842 * Set one or more CSS properties for the set of matched elements.
843 *
844 * @param properties An object of property-value pairs to set.
845 */
846 css(properties: Object): ChaiJQuery;
847
848 /**
849 * Get the current computed height for the first element in the set of matched elements.
850 */
851 height(): number;
852 /**
853 * Set the CSS height of every matched element.
854 *
855 * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
856 */
857 height(value: number | string): ChaiJQuery;
858 /**
859 * Set the CSS height of every matched element.
860 *
861 * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.
862 */
863 height(func: (index: number, height: number) => number | string): ChaiJQuery;
864
865 /**
866 * Get the current computed height for the first element in the set of matched elements, including padding but not border.
867 */
868 innerHeight(): number;
869
870 /**
871 * Sets the inner height on elements in the set of matched elements, including padding but not border.
872 *
873 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
874 */
875 innerHeight(height: number | string): ChaiJQuery;
876
877 /**
878 * Get the current computed width for the first element in the set of matched elements, including padding but not border.
879 */
880 innerWidth(): number;
881
882 /**
883 * Sets the inner width on elements in the set of matched elements, including padding but not border.
884 *
885 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
886 */
887 innerWidth(width: number | string): ChaiJQuery;
888
889 /**
890 * Get the current coordinates of the first element in the set of matched elements, relative to the document.
891 */
892 offset(): JQueryCoordinates;
893 /**
894 * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
895 *
896 * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
897 */
898 offset(coordinates: JQueryCoordinates): ChaiJQuery;
899 /**
900 * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
901 *
902 * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.
903 */
904 offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): ChaiJQuery;
905
906 /**
907 * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements.
908 *
909 * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
910 */
911 outerHeight(includeMargin?: boolean): number;
912
913 /**
914 * Sets the outer height on elements in the set of matched elements, including padding and border.
915 *
916 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
917 */
918 outerHeight(height: number | string): ChaiJQuery;
919
920 /**
921 * Get the current computed width for the first element in the set of matched elements, including padding and border.
922 *
923 * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
924 */
925 outerWidth(includeMargin?: boolean): number;
926
927 /**
928 * Sets the outer width on elements in the set of matched elements, including padding and border.
929 *
930 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
931 */
932 outerWidth(width: number | string): ChaiJQuery;
933
934 /**
935 * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
936 */
937 position(): JQueryCoordinates;
938
939 /**
940 * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.
941 */
942 scrollLeft(): number;
943 /**
944 * Set the current horizontal position of the scroll bar for each of the set of matched elements.
945 *
946 * @param value An integer indicating the new position to set the scroll bar to.
947 */
948 scrollLeft(value: number): ChaiJQuery;
949
950 /**
951 * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.
952 */
953 scrollTop(): number;
954 /**
955 * Set the current vertical position of the scroll bar for each of the set of matched elements.
956 *
957 * @param value An integer indicating the new position to set the scroll bar to.
958 */
959 scrollTop(value: number): ChaiJQuery;
960
961 /**
962 * Get the current computed width for the first element in the set of matched elements.
963 */
964 width(): number;
965 /**
966 * Set the CSS width of each element in the set of matched elements.
967 *
968 * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
969 */
970 width(value: number | string): ChaiJQuery;
971 /**
972 * Set the CSS width of each element in the set of matched elements.
973 *
974 * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.
975 */
976 width(func: (index: number, width: number) => number | string): ChaiJQuery;
977
978 /**
979 * Remove from the queue all items that have not yet been run.
980 *
981 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
982 */
983 clearQueue(queueName?: string): ChaiJQuery;
984
985 /**
986 * Store arbitrary data associated with the matched elements.
987 *
988 * @param key A string naming the piece of data to set.
989 * @param value The new data value; it can be any Javascript type including Array or Object.
990 */
991 data(key: string, value: any): ChaiJQuery;
992 /**
993 * Store arbitrary data associated with the matched elements.
994 *
995 * @param obj An object of key-value pairs of data to update.
996 */
997 data(obj: { [key: string]: any }): ChaiJQuery;
998 /**
999 * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
1000 *
1001 * @param key Name of the data stored.
1002 */
1003 data(key: string): any;
1004 /**
1005 * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
1006 */
1007 data(): any;
1008
1009 /**
1010 * Execute the next function on the queue for the matched elements.
1011 *
1012 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1013 */
1014 dequeue(queueName?: string): ChaiJQuery;
1015
1016 /**
1017 * Remove a previously-stored piece of data.
1018 *
1019 * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete.
1020 */
1021 removeData(name: string): ChaiJQuery;
1022 /**
1023 * Remove a previously-stored piece of data.
1024 *
1025 * @param list An array of strings naming the pieces of data to delete.
1026 */
1027 removeData(list: string[]): ChaiJQuery;
1028
1029 /**
1030 * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
1031 *
1032 * @param type The type of queue that needs to be observed. (default: fx)
1033 * @param target Object onto which the promise methods have to be attached
1034 */
1035 promise(type?: string, target?: Object): JQueryPromise<any>;
1036
1037 /**
1038 * Perform a custom animation of a set of CSS properties.
1039 *
1040 * @param properties An object of CSS properties and values that the animation will move toward.
1041 * @param duration A string or number determining how long the animation will run.
1042 * @param complete A function to call once the animation is complete.
1043 */
1044 animate(properties: Object, duration?: string | number, complete?: Function): ChaiJQuery;
1045 /**
1046 * Perform a custom animation of a set of CSS properties.
1047 *
1048 * @param properties An object of CSS properties and values that the animation will move toward.
1049 * @param duration A string or number determining how long the animation will run.
1050 * @param easing A string indicating which easing function to use for the transition. (default: swing)
1051 * @param complete A function to call once the animation is complete.
1052 */
1053 animate(properties: Object, duration?: string | number, easing?: string, complete?: Function): ChaiJQuery;
1054 /**
1055 * Perform a custom animation of a set of CSS properties.
1056 *
1057 * @param properties An object of CSS properties and values that the animation will move toward.
1058 * @param options A map of additional options to pass to the method.
1059 */
1060 animate(properties: Object, options: JQueryAnimationOptions): ChaiJQuery;
1061
1062 /**
1063 * Set a timer to delay execution of subsequent items in the queue.
1064 *
1065 * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue.
1066 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
1067 */
1068 delay(duration: number, queueName?: string): ChaiJQuery;
1069
1070 /**
1071 * Display the matched elements by fading them to opaque.
1072 *
1073 * @param duration A string or number determining how long the animation will run.
1074 * @param complete A function to call once the animation is complete.
1075 */
1076 fadeIn(duration?: number | string, complete?: Function): ChaiJQuery;
1077 /**
1078 * Display the matched elements by fading them to opaque.
1079 *
1080 * @param duration A string or number determining how long the animation will run.
1081 * @param easing A string indicating which easing function to use for the transition.
1082 * @param complete A function to call once the animation is complete.
1083 */
1084 fadeIn(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1085 /**
1086 * Display the matched elements by fading them to opaque.
1087 *
1088 * @param options A map of additional options to pass to the method.
1089 */
1090 fadeIn(options: JQueryAnimationOptions): ChaiJQuery;
1091
1092 /**
1093 * Hide the matched elements by fading them to transparent.
1094 *
1095 * @param duration A string or number determining how long the animation will run.
1096 * @param complete A function to call once the animation is complete.
1097 */
1098 fadeOut(duration?: number | string, complete?: Function): ChaiJQuery;
1099 /**
1100 * Hide the matched elements by fading them to transparent.
1101 *
1102 * @param duration A string or number determining how long the animation will run.
1103 * @param easing A string indicating which easing function to use for the transition.
1104 * @param complete A function to call once the animation is complete.
1105 */
1106 fadeOut(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1107 /**
1108 * Hide the matched elements by fading them to transparent.
1109 *
1110 * @param options A map of additional options to pass to the method.
1111 */
1112 fadeOut(options: JQueryAnimationOptions): ChaiJQuery;
1113
1114 /**
1115 * Adjust the opacity of the matched elements.
1116 *
1117 * @param duration A string or number determining how long the animation will run.
1118 * @param opacity A number between 0 and 1 denoting the target opacity.
1119 * @param complete A function to call once the animation is complete.
1120 */
1121 fadeTo(duration: string | number, opacity: number, complete?: Function): ChaiJQuery;
1122 /**
1123 * Adjust the opacity of the matched elements.
1124 *
1125 * @param duration A string or number determining how long the animation will run.
1126 * @param opacity A number between 0 and 1 denoting the target opacity.
1127 * @param easing A string indicating which easing function to use for the transition.
1128 * @param complete A function to call once the animation is complete.
1129 */
1130 fadeTo(duration: string | number, opacity: number, easing?: string, complete?: Function): ChaiJQuery;
1131
1132 /**
1133 * Display or hide the matched elements by animating their opacity.
1134 *
1135 * @param duration A string or number determining how long the animation will run.
1136 * @param complete A function to call once the animation is complete.
1137 */
1138 fadeToggle(duration?: number | string, complete?: Function): ChaiJQuery;
1139 /**
1140 * Display or hide the matched elements by animating their opacity.
1141 *
1142 * @param duration A string or number determining how long the animation will run.
1143 * @param easing A string indicating which easing function to use for the transition.
1144 * @param complete A function to call once the animation is complete.
1145 */
1146 fadeToggle(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1147 /**
1148 * Display or hide the matched elements by animating their opacity.
1149 *
1150 * @param options A map of additional options to pass to the method.
1151 */
1152 fadeToggle(options: JQueryAnimationOptions): ChaiJQuery;
1153
1154 /**
1155 * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
1156 *
1157 * @param queue The name of the queue in which to stop animations.
1158 */
1159 finish(queue?: string): ChaiJQuery;
1160
1161 /**
1162 * Hide the matched elements.
1163 *
1164 * @param duration A string or number determining how long the animation will run.
1165 * @param complete A function to call once the animation is complete.
1166 */
1167 hide(duration?: number | string, complete?: Function): ChaiJQuery;
1168 /**
1169 * Hide the matched elements.
1170 *
1171 * @param duration A string or number determining how long the animation will run.
1172 * @param easing A string indicating which easing function to use for the transition.
1173 * @param complete A function to call once the animation is complete.
1174 */
1175 hide(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1176 /**
1177 * Hide the matched elements.
1178 *
1179 * @param options A map of additional options to pass to the method.
1180 */
1181 hide(options: JQueryAnimationOptions): ChaiJQuery;
1182
1183 /**
1184 * Display the matched elements.
1185 *
1186 * @param duration A string or number determining how long the animation will run.
1187 * @param complete A function to call once the animation is complete.
1188 */
1189 show(duration?: number | string, complete?: Function): ChaiJQuery;
1190 /**
1191 * Display the matched elements.
1192 *
1193 * @param duration A string or number determining how long the animation will run.
1194 * @param easing A string indicating which easing function to use for the transition.
1195 * @param complete A function to call once the animation is complete.
1196 */
1197 show(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1198 /**
1199 * Display the matched elements.
1200 *
1201 * @param options A map of additional options to pass to the method.
1202 */
1203 show(options: JQueryAnimationOptions): ChaiJQuery;
1204
1205 /**
1206 * Display the matched elements with a sliding motion.
1207 *
1208 * @param duration A string or number determining how long the animation will run.
1209 * @param complete A function to call once the animation is complete.
1210 */
1211 slideDown(duration?: number | string, complete?: Function): ChaiJQuery;
1212 /**
1213 * Display the matched elements with a sliding motion.
1214 *
1215 * @param duration A string or number determining how long the animation will run.
1216 * @param easing A string indicating which easing function to use for the transition.
1217 * @param complete A function to call once the animation is complete.
1218 */
1219 slideDown(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1220 /**
1221 * Display the matched elements with a sliding motion.
1222 *
1223 * @param options A map of additional options to pass to the method.
1224 */
1225 slideDown(options: JQueryAnimationOptions): ChaiJQuery;
1226
1227 /**
1228 * Display or hide the matched elements with a sliding motion.
1229 *
1230 * @param duration A string or number determining how long the animation will run.
1231 * @param complete A function to call once the animation is complete.
1232 */
1233 slideToggle(duration?: number | string, complete?: Function): ChaiJQuery;
1234 /**
1235 * Display or hide the matched elements with a sliding motion.
1236 *
1237 * @param duration A string or number determining how long the animation will run.
1238 * @param easing A string indicating which easing function to use for the transition.
1239 * @param complete A function to call once the animation is complete.
1240 */
1241 slideToggle(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1242 /**
1243 * Display or hide the matched elements with a sliding motion.
1244 *
1245 * @param options A map of additional options to pass to the method.
1246 */
1247 slideToggle(options: JQueryAnimationOptions): ChaiJQuery;
1248
1249 /**
1250 * Hide the matched elements with a sliding motion.
1251 *
1252 * @param duration A string or number determining how long the animation will run.
1253 * @param complete A function to call once the animation is complete.
1254 */
1255 slideUp(duration?: number | string, complete?: Function): ChaiJQuery;
1256 /**
1257 * Hide the matched elements with a sliding motion.
1258 *
1259 * @param duration A string or number determining how long the animation will run.
1260 * @param easing A string indicating which easing function to use for the transition.
1261 * @param complete A function to call once the animation is complete.
1262 */
1263 slideUp(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1264 /**
1265 * Hide the matched elements with a sliding motion.
1266 *
1267 * @param options A map of additional options to pass to the method.
1268 */
1269 slideUp(options: JQueryAnimationOptions): ChaiJQuery;
1270
1271 /**
1272 * Stop the currently-running animation on the matched elements.
1273 *
1274 * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1275 * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1276 */
1277 stop(clearQueue?: boolean, jumpToEnd?: boolean): ChaiJQuery;
1278 /**
1279 * Stop the currently-running animation on the matched elements.
1280 *
1281 * @param queue The name of the queue in which to stop animations.
1282 * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
1283 * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
1284 */
1285 stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): ChaiJQuery;
1286
1287 /**
1288 * Display or hide the matched elements.
1289 *
1290 * @param duration A string or number determining how long the animation will run.
1291 * @param complete A function to call once the animation is complete.
1292 */
1293 toggle(duration?: number | string, complete?: Function): ChaiJQuery;
1294 /**
1295 * Display or hide the matched elements.
1296 *
1297 * @param duration A string or number determining how long the animation will run.
1298 * @param easing A string indicating which easing function to use for the transition.
1299 * @param complete A function to call once the animation is complete.
1300 */
1301 toggle(duration?: number | string, easing?: string, complete?: Function): ChaiJQuery;
1302 /**
1303 * Display or hide the matched elements.
1304 *
1305 * @param options A map of additional options to pass to the method.
1306 */
1307 toggle(options: JQueryAnimationOptions): ChaiJQuery;
1308 /**
1309 * Display or hide the matched elements.
1310 *
1311 * @param showOrHide A Boolean indicating whether to show or hide the elements.
1312 */
1313 toggle(showOrHide: boolean): ChaiJQuery;
1314
1315 /**
1316 * Attach a handler to an event for the elements.
1317 *
1318 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1319 * @param eventData An object containing data that will be passed to the event handler.
1320 * @param handler A function to execute each time the event is triggered.
1321 */
1322 bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1323 /**
1324 * Attach a handler to an event for the elements.
1325 *
1326 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1327 * @param handler A function to execute each time the event is triggered.
1328 */
1329 bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1330 /**
1331 * Attach a handler to an event for the elements.
1332 *
1333 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1334 * @param eventData An object containing data that will be passed to the event handler.
1335 * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
1336 */
1337 bind(eventType: string, eventData: any, preventBubble: boolean): ChaiJQuery;
1338 /**
1339 * Attach a handler to an event for the elements.
1340 *
1341 * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
1342 * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
1343 */
1344 bind(eventType: string, preventBubble: boolean): ChaiJQuery;
1345 /**
1346 * Attach a handler to an event for the elements.
1347 *
1348 * @param events An object containing one or more DOM event types and functions to execute for them.
1349 */
1350 bind(events: any): ChaiJQuery;
1351
1352 /**
1353 * Trigger the "blur" event on an element
1354 */
1355 blur(): ChaiJQuery;
1356 /**
1357 * Bind an event handler to the "blur" JavaScript event
1358 *
1359 * @param handler A function to execute each time the event is triggered.
1360 */
1361 blur(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1362 /**
1363 * Bind an event handler to the "blur" JavaScript event
1364 *
1365 * @param eventData An object containing data that will be passed to the event handler.
1366 * @param handler A function to execute each time the event is triggered.
1367 */
1368 blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1369
1370 /**
1371 * Trigger the "change" event on an element.
1372 */
1373 change(): ChaiJQuery;
1374 /**
1375 * Bind an event handler to the "change" JavaScript event
1376 *
1377 * @param handler A function to execute each time the event is triggered.
1378 */
1379 change(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1380 /**
1381 * Bind an event handler to the "change" JavaScript event
1382 *
1383 * @param eventData An object containing data that will be passed to the event handler.
1384 * @param handler A function to execute each time the event is triggered.
1385 */
1386 change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1387
1388 /**
1389 * Trigger the "click" event on an element.
1390 */
1391 click(): ChaiJQuery;
1392 /**
1393 * Bind an event handler to the "click" JavaScript event
1394 *
1395 * @param eventData An object containing data that will be passed to the event handler.
1396 */
1397 click(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1398 /**
1399 * Bind an event handler to the "click" JavaScript event
1400 *
1401 * @param eventData An object containing data that will be passed to the event handler.
1402 * @param handler A function to execute each time the event is triggered.
1403 */
1404 click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1405
1406 /**
1407 * Trigger the "dblclick" event on an element.
1408 */
1409 dblclick(): ChaiJQuery;
1410 /**
1411 * Bind an event handler to the "dblclick" JavaScript event
1412 *
1413 * @param handler A function to execute each time the event is triggered.
1414 */
1415 dblclick(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1416 /**
1417 * Bind an event handler to the "dblclick" JavaScript event
1418 *
1419 * @param eventData An object containing data that will be passed to the event handler.
1420 * @param handler A function to execute each time the event is triggered.
1421 */
1422 dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1423
1424 delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1425 delegate(
1426 selector: any,
1427 eventType: string,
1428 eventData: any,
1429 handler: (eventObject: JQueryEventObject) => any,
1430 ): ChaiJQuery;
1431
1432 /**
1433 * Trigger the "focus" event on an element.
1434 */
1435 focus(): ChaiJQuery;
1436 /**
1437 * Bind an event handler to the "focus" JavaScript event
1438 *
1439 * @param handler A function to execute each time the event is triggered.
1440 */
1441 focus(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1442 /**
1443 * Bind an event handler to the "focus" JavaScript event
1444 *
1445 * @param eventData An object containing data that will be passed to the event handler.
1446 * @param handler A function to execute each time the event is triggered.
1447 */
1448 focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1449
1450 /**
1451 * Bind an event handler to the "focusin" JavaScript event
1452 *
1453 * @param handler A function to execute each time the event is triggered.
1454 */
1455 focusin(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1456 /**
1457 * Bind an event handler to the "focusin" JavaScript event
1458 *
1459 * @param eventData An object containing data that will be passed to the event handler.
1460 * @param handler A function to execute each time the event is triggered.
1461 */
1462 focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1463
1464 /**
1465 * Bind an event handler to the "focusout" JavaScript event
1466 *
1467 * @param handler A function to execute each time the event is triggered.
1468 */
1469 focusout(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1470 /**
1471 * Bind an event handler to the "focusout" JavaScript event
1472 *
1473 * @param eventData An object containing data that will be passed to the event handler.
1474 * @param handler A function to execute each time the event is triggered.
1475 */
1476 focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1477
1478 /**
1479 * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
1480 *
1481 * @param handlerIn A function to execute when the mouse pointer enters the element.
1482 * @param handlerOut A function to execute when the mouse pointer leaves the element.
1483 */
1484 hover(
1485 handlerIn: (eventObject: JQueryEventObject) => any,
1486 handlerOut: (eventObject: JQueryEventObject) => any,
1487 ): ChaiJQuery;
1488 /**
1489 * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
1490 *
1491 * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element.
1492 */
1493 hover(handlerInOut: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1494
1495 /**
1496 * Trigger the "keydown" event on an element.
1497 */
1498 keydown(): ChaiJQuery;
1499 /**
1500 * Bind an event handler to the "keydown" JavaScript event
1501 *
1502 * @param handler A function to execute each time the event is triggered.
1503 */
1504 keydown(handler: (eventObject: JQueryKeyEventObject) => any): ChaiJQuery;
1505 /**
1506 * Bind an event handler to the "keydown" JavaScript event
1507 *
1508 * @param eventData An object containing data that will be passed to the event handler.
1509 * @param handler A function to execute each time the event is triggered.
1510 */
1511 keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): ChaiJQuery;
1512
1513 /**
1514 * Trigger the "keypress" event on an element.
1515 */
1516 keypress(): ChaiJQuery;
1517 /**
1518 * Bind an event handler to the "keypress" JavaScript event
1519 *
1520 * @param handler A function to execute each time the event is triggered.
1521 */
1522 keypress(handler: (eventObject: JQueryKeyEventObject) => any): ChaiJQuery;
1523 /**
1524 * Bind an event handler to the "keypress" JavaScript event
1525 *
1526 * @param eventData An object containing data that will be passed to the event handler.
1527 * @param handler A function to execute each time the event is triggered.
1528 */
1529 keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): ChaiJQuery;
1530
1531 /**
1532 * Trigger the "keyup" event on an element.
1533 */
1534 keyup(): ChaiJQuery;
1535 /**
1536 * Bind an event handler to the "keyup" JavaScript event
1537 *
1538 * @param handler A function to execute each time the event is triggered.
1539 */
1540 keyup(handler: (eventObject: JQueryKeyEventObject) => any): ChaiJQuery;
1541 /**
1542 * Bind an event handler to the "keyup" JavaScript event
1543 *
1544 * @param eventData An object containing data that will be passed to the event handler.
1545 * @param handler A function to execute each time the event is triggered.
1546 */
1547 keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): ChaiJQuery;
1548
1549 /**
1550 * Bind an event handler to the "load" JavaScript event.
1551 *
1552 * @param handler A function to execute when the event is triggered.
1553 */
1554 load(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1555 /**
1556 * Bind an event handler to the "load" JavaScript event.
1557 *
1558 * @param eventData An object containing data that will be passed to the event handler.
1559 * @param handler A function to execute when the event is triggered.
1560 */
1561 load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1562
1563 /**
1564 * Trigger the "mousedown" event on an element.
1565 */
1566 mousedown(): ChaiJQuery;
1567 /**
1568 * Bind an event handler to the "mousedown" JavaScript event.
1569 *
1570 * @param handler A function to execute when the event is triggered.
1571 */
1572 mousedown(handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1573 /**
1574 * Bind an event handler to the "mousedown" JavaScript event.
1575 *
1576 * @param eventData An object containing data that will be passed to the event handler.
1577 * @param handler A function to execute when the event is triggered.
1578 */
1579 mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1580
1581 /**
1582 * Trigger the "mouseenter" event on an element.
1583 */
1584 mouseenter(): ChaiJQuery;
1585 /**
1586 * Bind an event handler to be fired when the mouse enters an element.
1587 *
1588 * @param handler A function to execute when the event is triggered.
1589 */
1590 mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1591 /**
1592 * Bind an event handler to be fired when the mouse enters an element.
1593 *
1594 * @param eventData An object containing data that will be passed to the event handler.
1595 * @param handler A function to execute when the event is triggered.
1596 */
1597 mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1598
1599 /**
1600 * Trigger the "mouseleave" event on an element.
1601 */
1602 mouseleave(): ChaiJQuery;
1603 /**
1604 * Bind an event handler to be fired when the mouse leaves an element.
1605 *
1606 * @param handler A function to execute when the event is triggered.
1607 */
1608 mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1609 /**
1610 * Bind an event handler to be fired when the mouse leaves an element.
1611 *
1612 * @param eventData An object containing data that will be passed to the event handler.
1613 * @param handler A function to execute when the event is triggered.
1614 */
1615 mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1616
1617 /**
1618 * Trigger the "mousemove" event on an element.
1619 */
1620 mousemove(): ChaiJQuery;
1621 /**
1622 * Bind an event handler to the "mousemove" JavaScript event.
1623 *
1624 * @param handler A function to execute when the event is triggered.
1625 */
1626 mousemove(handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1627 /**
1628 * Bind an event handler to the "mousemove" JavaScript event.
1629 *
1630 * @param eventData An object containing data that will be passed to the event handler.
1631 * @param handler A function to execute when the event is triggered.
1632 */
1633 mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1634
1635 /**
1636 * Trigger the "mouseout" event on an element.
1637 */
1638 mouseout(): ChaiJQuery;
1639 /**
1640 * Bind an event handler to the "mouseout" JavaScript event.
1641 *
1642 * @param handler A function to execute when the event is triggered.
1643 */
1644 mouseout(handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1645 /**
1646 * Bind an event handler to the "mouseout" JavaScript event.
1647 *
1648 * @param eventData An object containing data that will be passed to the event handler.
1649 * @param handler A function to execute when the event is triggered.
1650 */
1651 mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1652
1653 /**
1654 * Trigger the "mouseover" event on an element.
1655 */
1656 mouseover(): ChaiJQuery;
1657 /**
1658 * Bind an event handler to the "mouseover" JavaScript event.
1659 *
1660 * @param handler A function to execute when the event is triggered.
1661 */
1662 mouseover(handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1663 /**
1664 * Bind an event handler to the "mouseover" JavaScript event.
1665 *
1666 * @param eventData An object containing data that will be passed to the event handler.
1667 * @param handler A function to execute when the event is triggered.
1668 */
1669 mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1670
1671 /**
1672 * Trigger the "mouseup" event on an element.
1673 */
1674 mouseup(): ChaiJQuery;
1675 /**
1676 * Bind an event handler to the "mouseup" JavaScript event.
1677 *
1678 * @param handler A function to execute when the event is triggered.
1679 */
1680 mouseup(handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1681 /**
1682 * Bind an event handler to the "mouseup" JavaScript event.
1683 *
1684 * @param eventData An object containing data that will be passed to the event handler.
1685 * @param handler A function to execute when the event is triggered.
1686 */
1687 mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): ChaiJQuery;
1688
1689 /**
1690 * Remove an event handler.
1691 */
1692 off(): ChaiJQuery;
1693 /**
1694 * Remove an event handler.
1695 *
1696 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
1697 * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
1698 * @param handler A handler function previously attached for the event(s), or the special value false.
1699 */
1700 off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1701 /**
1702 * Remove an event handler.
1703 *
1704 * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
1705 * @param handler A handler function previously attached for the event(s), or the special value false.
1706 */
1707 off(events: string, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1708 /**
1709 * Remove an event handler.
1710 *
1711 * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).
1712 * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
1713 */
1714 off(events: { [key: string]: any }, selector?: string): ChaiJQuery;
1715
1716 /**
1717 * Attach an event handler function for one or more events to the selected elements.
1718 *
1719 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
1720 * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).
1721 */
1722 on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): ChaiJQuery;
1723 /**
1724 * Attach an event handler function for one or more events to the selected elements.
1725 *
1726 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
1727 * @param data Data to be passed to the handler in event.data when an event is triggered.
1728 * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
1729 */
1730 on(events: string, data: any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): ChaiJQuery;
1731 /**
1732 * Attach an event handler function for one or more events to the selected elements.
1733 *
1734 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
1735 * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
1736 * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
1737 */
1738 on(
1739 events: string,
1740 selector: string,
1741 handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any,
1742 ): ChaiJQuery;
1743 /**
1744 * Attach an event handler function for one or more events to the selected elements.
1745 *
1746 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
1747 * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
1748 * @param data Data to be passed to the handler in event.data when an event is triggered.
1749 * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
1750 */
1751 on(
1752 events: string,
1753 selector: string,
1754 data: any,
1755 handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any,
1756 ): ChaiJQuery;
1757 /**
1758 * Attach an event handler function for one or more events to the selected elements.
1759 *
1760 * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
1761 * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
1762 * @param data Data to be passed to the handler in event.data when an event occurs.
1763 */
1764 on(events: { [key: string]: any }, selector?: string, data?: any): ChaiJQuery;
1765 /**
1766 * Attach an event handler function for one or more events to the selected elements.
1767 *
1768 * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
1769 * @param data Data to be passed to the handler in event.data when an event occurs.
1770 */
1771 on(events: { [key: string]: any }, data?: any): ChaiJQuery;
1772
1773 /**
1774 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
1775 *
1776 * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
1777 * @param handler A function to execute at the time the event is triggered.
1778 */
1779 one(events: string, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1780 /**
1781 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
1782 *
1783 * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
1784 * @param data An object containing data that will be passed to the event handler.
1785 * @param handler A function to execute at the time the event is triggered.
1786 */
1787 one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1788
1789 /**
1790 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
1791 *
1792 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
1793 * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
1794 * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
1795 */
1796 one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1797 /**
1798 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
1799 *
1800 * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
1801 * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
1802 * @param data Data to be passed to the handler in event.data when an event is triggered.
1803 * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
1804 */
1805 one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1806
1807 /**
1808 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
1809 *
1810 * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
1811 * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
1812 * @param data Data to be passed to the handler in event.data when an event occurs.
1813 */
1814 one(events: { [key: string]: any }, selector?: string, data?: any): ChaiJQuery;
1815
1816 /**
1817 * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
1818 *
1819 * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
1820 * @param data Data to be passed to the handler in event.data when an event occurs.
1821 */
1822 one(events: { [key: string]: any }, data?: any): ChaiJQuery;
1823
1824 /**
1825 * Specify a function to execute when the DOM is fully loaded.
1826 *
1827 * @param handler A function to execute after the DOM is ready.
1828 */
1829 ready(handler: Function): ChaiJQuery;
1830
1831 /**
1832 * Trigger the "resize" event on an element.
1833 */
1834 resize(): ChaiJQuery;
1835 /**
1836 * Bind an event handler to the "resize" JavaScript event.
1837 *
1838 * @param handler A function to execute each time the event is triggered.
1839 */
1840 resize(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1841 /**
1842 * Bind an event handler to the "resize" JavaScript event.
1843 *
1844 * @param eventData An object containing data that will be passed to the event handler.
1845 * @param handler A function to execute each time the event is triggered.
1846 */
1847 resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1848
1849 /**
1850 * Trigger the "scroll" event on an element.
1851 */
1852 scroll(): ChaiJQuery;
1853 /**
1854 * Bind an event handler to the "scroll" JavaScript event.
1855 *
1856 * @param handler A function to execute each time the event is triggered.
1857 */
1858 scroll(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1859 /**
1860 * Bind an event handler to the "scroll" JavaScript event.
1861 *
1862 * @param eventData An object containing data that will be passed to the event handler.
1863 * @param handler A function to execute each time the event is triggered.
1864 */
1865 scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1866
1867 /**
1868 * Trigger the "select" event on an element.
1869 */
1870 select(): ChaiJQuery;
1871 /**
1872 * Bind an event handler to the "select" JavaScript event.
1873 *
1874 * @param handler A function to execute each time the event is triggered.
1875 */
1876 select(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1877 /**
1878 * Bind an event handler to the "select" JavaScript event.
1879 *
1880 * @param eventData An object containing data that will be passed to the event handler.
1881 * @param handler A function to execute each time the event is triggered.
1882 */
1883 select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1884
1885 /**
1886 * Trigger the "submit" event on an element.
1887 */
1888 submit(): ChaiJQuery;
1889 /**
1890 * Bind an event handler to the "submit" JavaScript event
1891 *
1892 * @param handler A function to execute each time the event is triggered.
1893 */
1894 submit(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1895 /**
1896 * Bind an event handler to the "submit" JavaScript event
1897 *
1898 * @param eventData An object containing data that will be passed to the event handler.
1899 * @param handler A function to execute each time the event is triggered.
1900 */
1901 submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1902
1903 /**
1904 * Execute all handlers and behaviors attached to the matched elements for the given event type.
1905 *
1906 * @param eventType A string containing a JavaScript event type, such as click or submit.
1907 * @param extraParameters Additional parameters to pass along to the event handler.
1908 */
1909 trigger(eventType: string, extraParameters?: any[] | Object): ChaiJQuery;
1910 /**
1911 * Execute all handlers and behaviors attached to the matched elements for the given event type.
1912 *
1913 * @param event A jQuery.Event object.
1914 * @param extraParameters Additional parameters to pass along to the event handler.
1915 */
1916 trigger(event: JQueryEventObject, extraParameters?: any[] | Object): ChaiJQuery;
1917
1918 /**
1919 * Execute all handlers attached to an element for an event.
1920 *
1921 * @param eventType A string containing a JavaScript event type, such as click or submit.
1922 * @param extraParameters An array of additional parameters to pass along to the event handler.
1923 */
1924 triggerHandler(eventType: string, ...extraParameters: any[]): Object;
1925
1926 /**
1927 * Remove a previously-attached event handler from the elements.
1928 *
1929 * @param eventType A string containing a JavaScript event type, such as click or submit.
1930 * @param handler The function that is to be no longer executed.
1931 */
1932 unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1933 /**
1934 * Remove a previously-attached event handler from the elements.
1935 *
1936 * @param eventType A string containing a JavaScript event type, such as click or submit.
1937 * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).
1938 */
1939 unbind(eventType: string, fls: boolean): ChaiJQuery;
1940 /**
1941 * Remove a previously-attached event handler from the elements.
1942 *
1943 * @param evt A JavaScript event object as passed to an event handler.
1944 */
1945 unbind(evt: any): ChaiJQuery;
1946
1947 /**
1948 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
1949 */
1950 undelegate(): ChaiJQuery;
1951 /**
1952 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
1953 *
1954 * @param selector A selector which will be used to filter the event results.
1955 * @param eventType A string containing a JavaScript event type, such as "click" or "keydown"
1956 * @param handler A function to execute at the time the event is triggered.
1957 */
1958 undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1959 /**
1960 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
1961 *
1962 * @param selector A selector which will be used to filter the event results.
1963 * @param events An object of one or more event types and previously bound functions to unbind from them.
1964 */
1965 undelegate(selector: string, events: Object): ChaiJQuery;
1966 /**
1967 * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
1968 *
1969 * @param namespace A string containing a namespace to unbind all events from.
1970 */
1971 undelegate(namespace: string): ChaiJQuery;
1972
1973 /**
1974 * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
1975 *
1976 * @param handler A function to execute when the event is triggered.
1977 */
1978 unload(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1979 /**
1980 * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
1981 *
1982 * @param eventData A plain object of data that will be passed to the event handler.
1983 * @param handler A function to execute when the event is triggered.
1984 */
1985 unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): ChaiJQuery;
1986
1987 /**
1988 * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10)
1989 */
1990 context: Element;
1991
1992 jquery: string;
1993
1994 /**
1995 * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
1996 *
1997 * @param handler A function to execute when the event is triggered.
1998 */
1999 error(handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
2000 /**
2001 * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
2002 *
2003 * @param eventData A plain object of data that will be passed to the event handler.
2004 * @param handler A function to execute when the event is triggered.
2005 */
2006 error(eventData: any, handler: (eventObject: JQueryEventObject) => any): ChaiJQuery;
2007
2008 /**
2009 * Add a collection of DOM elements onto the jQuery stack.
2010 *
2011 * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2012 */
2013 pushStack(elements: any[]): ChaiJQuery;
2014 /**
2015 * Add a collection of DOM elements onto the jQuery stack.
2016 *
2017 * @param elements An array of elements to push onto the stack and make into a new jQuery object.
2018 * @param name The name of a jQuery method that generated the array of elements.
2019 * @param arguments The arguments that were passed in to the jQuery method (for serialization).
2020 */
2021 pushStack(elements: any[], name: string, arguments: any[]): ChaiJQuery;
2022
2023 /**
2024 * Insert content, specified by the parameter, after each element in the set of matched elements.
2025 *
2026 * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements.
2027 * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
2028 */
2029 after(content1: JQuery | any[] | Element | Text | string, ...content2: any[]): ChaiJQuery;
2030 /**
2031 * Insert content, specified by the parameter, after each element in the set of matched elements.
2032 *
2033 * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2034 */
2035 after(func: (index: number, html: string) => string | Element | JQuery): ChaiJQuery;
2036
2037 /**
2038 * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2039 *
2040 * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
2041 * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
2042 */
2043 append(content1: JQuery | any[] | Element | Text | string, ...content2: any[]): ChaiJQuery;
2044 /**
2045 * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
2046 *
2047 * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
2048 */
2049 append(func: (index: number, html: string) => string | Element | JQuery): ChaiJQuery;
2050
2051 /**
2052 * Insert every element in the set of matched elements to the end of the target.
2053 *
2054 * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.
2055 */
2056 appendTo(target: JQuery | any[] | Element | string): ChaiJQuery;
2057
2058 /**
2059 * Insert content, specified by the parameter, before each element in the set of matched elements.
2060 *
2061 * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements.
2062 * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
2063 */
2064 before(content1: JQuery | any[] | Element | Text | string, ...content2: any[]): ChaiJQuery;
2065 /**
2066 * Insert content, specified by the parameter, before each element in the set of matched elements.
2067 *
2068 * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2069 */
2070 before(func: (index: number, html: string) => string | Element | JQuery): ChaiJQuery;
2071
2072 /**
2073 * Create a deep copy of the set of matched elements.
2074 *
2075 * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false.
2076 * param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).
2077 */
2078 clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): ChaiJQuery;
2079
2080 /**
2081 * Remove the set of matched elements from the DOM.
2082 *
2083 * param selector A selector expression that filters the set of matched elements to be removed.
2084 */
2085 detach(selector?: string): ChaiJQuery;
2086
2087 /**
2088 * Remove all child nodes of the set of matched elements from the DOM.
2089 */
2090 empty(): ChaiJQuery;
2091
2092 /**
2093 * Insert every element in the set of matched elements after the target.
2094 *
2095 * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.
2096 */
2097 insertAfter(target: JQuery | any[] | Element | Text | string): ChaiJQuery;
2098
2099 /**
2100 * Insert every element in the set of matched elements before the target.
2101 *
2102 * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.
2103 */
2104 insertBefore(target: JQuery | any[] | Element | Text | string): ChaiJQuery;
2105
2106 /**
2107 * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2108 *
2109 * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
2110 * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
2111 */
2112 prepend(content1: JQuery | any[] | Element | Text | string, ...content2: any[]): ChaiJQuery;
2113 /**
2114 * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
2115 *
2116 * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
2117 */
2118 prepend(func: (index: number, html: string) => string | Element | JQuery): ChaiJQuery;
2119
2120 /**
2121 * Insert every element in the set of matched elements to the beginning of the target.
2122 *
2123 * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.
2124 */
2125 prependTo(target: JQuery | any[] | Element | string): ChaiJQuery;
2126
2127 /**
2128 * Remove the set of matched elements from the DOM.
2129 *
2130 * @param selector A selector expression that filters the set of matched elements to be removed.
2131 */
2132 remove(selector?: string): ChaiJQuery;
2133
2134 /**
2135 * Replace each target element with the set of matched elements.
2136 *
2137 * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.
2138 */
2139 replaceAll(target: JQuery | any[] | Element | string): ChaiJQuery;
2140
2141 /**
2142 * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2143 *
2144 * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
2145 */
2146 replaceWith(newContent: JQuery | any[] | Element | Text | string): ChaiJQuery;
2147 /**
2148 * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
2149 *
2150 * param func A function that returns content with which to replace the set of matched elements.
2151 */
2152 replaceWith(func: () => Element | JQuery): ChaiJQuery;
2153
2154 /**
2155 * Get the combined text contents of each element in the set of matched elements, including their descendants.
2156 */
2157 text(): string;
2158 /**
2159 * Set the content of each element in the set of matched elements to the specified text.
2160 *
2161 * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation.
2162 */
2163 text(text: string | number | boolean): ChaiJQuery;
2164 /**
2165 * Set the content of each element in the set of matched elements to the specified text.
2166 *
2167 * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.
2168 */
2169 text(func: (index: number, text: string) => string): ChaiJQuery;
2170
2171 /**
2172 * Retrieve all the elements contained in the jQuery set, as an array.
2173 */
2174 toArray(): any[];
2175
2176 /**
2177 * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
2178 */
2179 unwrap(): ChaiJQuery;
2180
2181 /**
2182 * Wrap an HTML structure around each element in the set of matched elements.
2183 *
2184 * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2185 */
2186 wrap(wrappingElement: JQuery | Element | string): ChaiJQuery;
2187 /**
2188 * Wrap an HTML structure around each element in the set of matched elements.
2189 *
2190 * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2191 */
2192 wrap(func: (index: number) => string | JQuery): ChaiJQuery;
2193
2194 /**
2195 * Wrap an HTML structure around all elements in the set of matched elements.
2196 *
2197 * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
2198 */
2199 wrapAll(wrappingElement: JQuery | Element | string): ChaiJQuery;
2200 wrapAll(func: (index: number) => string): ChaiJQuery;
2201
2202 /**
2203 * Wrap an HTML structure around the content of each element in the set of matched elements.
2204 *
2205 * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
2206 */
2207 wrapInner(wrappingElement: JQuery | Element | string): ChaiJQuery;
2208 /**
2209 * Wrap an HTML structure around the content of each element in the set of matched elements.
2210 *
2211 * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
2212 */
2213 wrapInner(func: (index: number) => string): ChaiJQuery;
2214
2215 /**
2216 * Iterate over a jQuery object, executing a function for each matched element.
2217 *
2218 * @param func A function to execute for each matched element.
2219 */
2220 each(func: (index: number, elem: Element) => any): ChaiJQuery;
2221
2222 /**
2223 * Retrieve one of the elements matched by the jQuery object.
2224 *
2225 * @param index A zero-based integer indicating which element to retrieve.
2226 */
2227 get(index: number): HTMLElement;
2228 /**
2229 * Retrieve the elements matched by the jQuery object.
2230 */
2231 get(): any[];
2232
2233 /**
2234 * Search for a given element from among the matched elements.
2235 */
2236 index(): number;
2237 /**
2238 * Search for a given element from among the matched elements.
2239 *
2240 * @param selector A selector representing a jQuery collection in which to look for an element.
2241 */
2242 index(selector: string | JQuery | Element): number;
2243
2244 /**
2245 * The number of elements in the jQuery object.
2246 */
2247 length: number;
2248 /**
2249 * A selector representing selector passed to jQuery(), if any, when creating the original set.
2250 * version deprecated: 1.7, removed: 1.9
2251 */
2252 selector: string;
2253 [index: string]: any;
2254 [index: number]: HTMLElement;
2255
2256 /**
2257 * Add elements to the set of matched elements.
2258 *
2259 * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements.
2260 * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
2261 */
2262 add(selector: string, context?: Element): ChaiJQuery;
2263 /**
2264 * Add elements to the set of matched elements.
2265 *
2266 * @param elements One or more elements to add to the set of matched elements.
2267 */
2268 add(...elements: Element[]): ChaiJQuery;
2269 /**
2270 * Add elements to the set of matched elements.
2271 *
2272 * @param html An HTML fragment to add to the set of matched elements.
2273 */
2274 add(html: string): ChaiJQuery;
2275 /**
2276 * Add elements to the set of matched elements.
2277 *
2278 * @param obj An existing jQuery object to add to the set of matched elements.
2279 */
2280 add(obj: JQuery): ChaiJQuery;
2281
2282 /**
2283 * Get the children of each element in the set of matched elements, optionally filtered by a selector.
2284 *
2285 * @param selector A string containing a selector expression to match elements against.
2286 */
2287 children(selector?: string): ChaiJQuery;
2288
2289 /**
2290 * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2291 *
2292 * @param selector A string containing a selector expression to match elements against.
2293 */
2294 closest(selector: string): ChaiJQuery;
2295 /**
2296 * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2297 *
2298 * @param selector A string containing a selector expression to match elements against.
2299 * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
2300 */
2301 closest(selector: string, context?: Element): ChaiJQuery;
2302 /**
2303 * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2304 *
2305 * @param obj A jQuery object to match elements against.
2306 */
2307 closest(obj: JQuery): ChaiJQuery;
2308 /**
2309 * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2310 *
2311 * @param element An element to match elements against.
2312 */
2313 closest(element: Element): ChaiJQuery;
2314
2315 /**
2316 * Get an array of all the elements and selectors matched against the current element up through the DOM tree.
2317 *
2318 * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object).
2319 * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
2320 */
2321 closest(selectors: any, context?: Element): any[];
2322
2323 /**
2324 * Get the children of each element in the set of matched elements, including text and comment nodes.
2325 */
2326 contents(): ChaiJQuery;
2327
2328 /**
2329 * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
2330 */
2331 end(): ChaiJQuery;
2332
2333 /**
2334 * Reduce the set of matched elements to the one at the specified index.
2335 *
2336 * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set.
2337 */
2338 eq(index: number): ChaiJQuery;
2339
2340 /**
2341 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2342 *
2343 * @param selector A string containing a selector expression to match the current set of elements against.
2344 */
2345 filter(selector: string): ChaiJQuery;
2346 /**
2347 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2348 *
2349 * @param func A function used as a test for each element in the set. this is the current DOM element.
2350 */
2351 filter(func: (index: number, element: Element) => any): ChaiJQuery;
2352 /**
2353 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2354 *
2355 * @param element An element to match the current set of elements against.
2356 */
2357 filter(element: Element): ChaiJQuery;
2358 /**
2359 * Reduce the set of matched elements to those that match the selector or pass the function's test.
2360 *
2361 * @param obj An existing jQuery object to match the current set of elements against.
2362 */
2363 filter(obj: JQuery): ChaiJQuery;
2364
2365 /**
2366 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2367 *
2368 * @param selector A string containing a selector expression to match elements against.
2369 */
2370 find(selector: string): ChaiJQuery;
2371 /**
2372 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2373 *
2374 * @param element An element to match elements against.
2375 */
2376 find(element: Element): ChaiJQuery;
2377 /**
2378 * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
2379 *
2380 * @param obj A jQuery object to match elements against.
2381 */
2382 find(obj: JQuery): ChaiJQuery;
2383
2384 /**
2385 * Reduce the set of matched elements to the first in the set.
2386 */
2387 first(): ChaiJQuery;
2388
2389 /**
2390 * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
2391 *
2392 * @param selector A string containing a selector expression to match elements against.
2393 */
2394 has(selector: string): ChaiJQuery;
2395 /**
2396 * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
2397 *
2398 * @param contained A DOM element to match elements against.
2399 */
2400 has(contained: Element): ChaiJQuery;
2401
2402 /**
2403 * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
2404 *
2405 * @param selector A string containing a selector expression to match elements against.
2406 */
2407 is(selector: string): boolean;
2408 /**
2409 * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
2410 *
2411 * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.
2412 */
2413 is(func: (index: number, element: Element) => boolean): boolean;
2414 /**
2415 * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
2416 *
2417 * @param obj An existing jQuery object to match the current set of elements against.
2418 */
2419 is(obj: JQuery): boolean;
2420 /**
2421 * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
2422 *
2423 * @param elements One or more elements to match the current set of elements against.
2424 */
2425 is(elements: any): boolean;
2426
2427 /**
2428 * Reduce the set of matched elements to the final one in the set.
2429 */
2430 last(): ChaiJQuery;
2431
2432 /**
2433 * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
2434 *
2435 * @param callback A function object that will be invoked for each element in the current set.
2436 */
2437 map(callback: (index: number, domElement: Element) => any): ChaiJQuery;
2438
2439 /**
2440 * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
2441 *
2442 * @param selector A string containing a selector expression to match elements against.
2443 */
2444 next(selector?: string): ChaiJQuery;
2445
2446 /**
2447 * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
2448 *
2449 * @param selector A string containing a selector expression to match elements against.
2450 */
2451 nextAll(selector?: string): ChaiJQuery;
2452
2453 /**
2454 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
2455 *
2456 * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements.
2457 * @param filter A string containing a selector expression to match elements against.
2458 */
2459 nextUntil(selector?: string, filter?: string): ChaiJQuery;
2460 /**
2461 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
2462 *
2463 * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements.
2464 * @param filter A string containing a selector expression to match elements against.
2465 */
2466 nextUntil(element?: Element, filter?: string): ChaiJQuery;
2467 /**
2468 * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
2469 *
2470 * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements.
2471 * @param filter A string containing a selector expression to match elements against.
2472 */
2473 nextUntil(obj?: JQuery, filter?: string): ChaiJQuery;
2474
2475 /**
2476 * Remove elements from the set of matched elements.
2477 *
2478 * @param selector A string containing a selector expression to match elements against.
2479 */
2480 not(selector: string): ChaiJQuery;
2481 /**
2482 * Remove elements from the set of matched elements.
2483 *
2484 * @param func A function used as a test for each element in the set. this is the current DOM element.
2485 */
2486 not(func: (index: number, element: Element) => boolean): ChaiJQuery;
2487 /**
2488 * Remove elements from the set of matched elements.
2489 *
2490 * @param elements One or more DOM elements to remove from the matched set.
2491 */
2492 not(...elements: Element[]): ChaiJQuery;
2493 /**
2494 * Remove elements from the set of matched elements.
2495 *
2496 * @param obj An existing jQuery object to match the current set of elements against.
2497 */
2498 not(obj: JQuery): ChaiJQuery;
2499
2500 /**
2501 * Get the closest ancestor element that is positioned.
2502 */
2503 offsetParent(): ChaiJQuery;
2504
2505 /**
2506 * Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
2507 *
2508 * @param selector A string containing a selector expression to match elements against.
2509 */
2510 parent(selector?: string): ChaiJQuery;
2511
2512 /**
2513 * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
2514 *
2515 * @param selector A string containing a selector expression to match elements against.
2516 */
2517 parents(selector?: string): ChaiJQuery;
2518
2519 /**
2520 * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
2521 *
2522 * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements.
2523 * @param filter A string containing a selector expression to match elements against.
2524 */
2525 parentsUntil(selector?: string, filter?: string): ChaiJQuery;
2526 /**
2527 * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
2528 *
2529 * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements.
2530 * @param filter A string containing a selector expression to match elements against.
2531 */
2532 parentsUntil(element?: Element, filter?: string): ChaiJQuery;
2533 /**
2534 * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
2535 *
2536 * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements.
2537 * @param filter A string containing a selector expression to match elements against.
2538 */
2539 parentsUntil(obj?: JQuery, filter?: string): ChaiJQuery;
2540
2541 /**
2542 * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
2543 *
2544 * @param selector A string containing a selector expression to match elements against.
2545 */
2546 prev(selector?: string): ChaiJQuery;
2547
2548 /**
2549 * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
2550 *
2551 * @param selector A string containing a selector expression to match elements against.
2552 */
2553 prevAll(selector?: string): ChaiJQuery;
2554
2555 /**
2556 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
2557 *
2558 * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements.
2559 * @param filter A string containing a selector expression to match elements against.
2560 */
2561 prevUntil(selector?: string, filter?: string): ChaiJQuery;
2562 /**
2563 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
2564 *
2565 * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
2566 * @param filter A string containing a selector expression to match elements against.
2567 */
2568 prevUntil(element?: Element, filter?: string): ChaiJQuery;
2569 /**
2570 * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
2571 *
2572 * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
2573 * @param filter A string containing a selector expression to match elements against.
2574 */
2575 prevUntil(obj?: JQuery, filter?: string): ChaiJQuery;
2576
2577 /**
2578 * Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
2579 *
2580 * @param selector A string containing a selector expression to match elements against.
2581 */
2582 siblings(selector?: string): ChaiJQuery;
2583
2584 /**
2585 * Reduce the set of matched elements to a subset specified by a range of indices.
2586 *
2587 * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.
2588 * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.
2589 */
2590 slice(start: number, end?: number): ChaiJQuery;
2591
2592 /**
2593 * Show the queue of functions to be executed on the matched elements.
2594 *
2595 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
2596 */
2597 queue(queueName?: string): any[];
2598 /**
2599 * Manipulate the queue of functions to be executed, once for each matched element.
2600 *
2601 * @param newQueue An array of functions to replace the current queue contents.
2602 */
2603 queue(newQueue: Function[]): ChaiJQuery;
2604 /**
2605 * Manipulate the queue of functions to be executed, once for each matched element.
2606 *
2607 * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
2608 */
2609 queue(callback: Function): ChaiJQuery;
2610 /**
2611 * Manipulate the queue of functions to be executed, once for each matched element.
2612 *
2613 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
2614 * @param newQueue An array of functions to replace the current queue contents.
2615 */
2616 queue(queueName: string, newQueue: Function[]): ChaiJQuery;
2617 /**
2618 * Manipulate the queue of functions to be executed, once for each matched element.
2619 *
2620 * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
2621 * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
2622 */
2623 queue(queueName: string, callback: Function): ChaiJQuery;
2624 should: Chai.Assertion;
2625}
2626
\No newline at end of file