mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
jQuery: JSDoc'd extend/globalEval/grep/inArray
This commit is contained in:
Vendored
+36
-2
@@ -893,13 +893,47 @@ interface JQueryStatic {
|
||||
callback: (indexInArray: any, valueOfElement: any) => any
|
||||
): any;
|
||||
|
||||
extend(target: any, ...objs: any[]): any;
|
||||
extend(deep: boolean, target: any, ...objs: any[]): any;
|
||||
/**
|
||||
* Merge the contents of two or more objects together into the first object.
|
||||
*
|
||||
* @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.
|
||||
* @param object1 An object containing additional properties to merge in.
|
||||
* @param objectN Additional objects containing properties to merge in.
|
||||
*/
|
||||
extend(target: any, object1?: any, ...objectN: any[]): any;
|
||||
/**
|
||||
* Merge the contents of two or more objects together into the first object.
|
||||
*
|
||||
* @param deep If true, the merge becomes recursive (aka. deep copy).
|
||||
* @param target The object to extend. It will receive the new properties.
|
||||
* @param object1 An object containing additional properties to merge in.
|
||||
* @param objectN Additional objects containing properties to merge in.
|
||||
*/
|
||||
extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any;
|
||||
|
||||
/**
|
||||
* Execute some JavaScript code globally.
|
||||
*
|
||||
* @param code The JavaScript code to execute.
|
||||
*/
|
||||
globalEval(code: string): any;
|
||||
|
||||
/**
|
||||
* Finds the elements of an array which satisfy a filter function. The original array is not affected.
|
||||
*
|
||||
* @param array The array to search through.
|
||||
* @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.
|
||||
* @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.
|
||||
*/
|
||||
grep<T>(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[];
|
||||
|
||||
/**
|
||||
* Search for a specified value within an array and return its index (or -1 if not found).
|
||||
*
|
||||
* @param value The value to search for.
|
||||
* @param array An array through which to search.
|
||||
* @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array.
|
||||
*/
|
||||
inArray<T>(value: T, array: T[], fromIndex?: number): number;
|
||||
|
||||
isArray(obj: any): boolean;
|
||||
|
||||
Reference in New Issue
Block a user