UNPKG

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