UNPKG

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