declarations
Version:
[](https://www.npmjs.com/package/declarations)
1,850 lines (1,627 loc) • 150 kB
TypeScript
// Type definitions for Underscore 1.8.3
// Project: http://underscorejs.org/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Josh Baldwin <https://github.com/jbaldwin/>, Christopher Currens <https://github.com/ccurrens/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module _ {
/**
* underscore.js _.throttle options.
**/
interface ThrottleSettings {
/**
* If you'd like to disable the leading-edge call, pass this as false.
**/
leading?: boolean;
/**
* If you'd like to disable the execution on the trailing-edge, pass false.
**/
trailing?: boolean;
}
/**
* underscore.js template settings, set templateSettings or pass as an argument
* to 'template()' to override defaults.
**/
interface TemplateSettings {
/**
* Default value is '/<%([\s\S]+?)%>/g'.
**/
evaluate?: RegExp;
/**
* Default value is '/<%=([\s\S]+?)%>/g'.
**/
interpolate?: RegExp;
/**
* Default value is '/<%-([\s\S]+?)%>/g'.
**/
escape?: RegExp;
/**
* By default, 'template()' places the values from your data in the local scope via the 'with' statement.
* However, you can specify a single variable name with this setting.
**/
variable?: string;
}
interface Collection<T> { }
// Common interface between Arrays and jQuery objects
interface List<T> extends Collection<T> {
[index: number]: T;
length: number;
}
interface Dictionary<T> extends Collection<T> {
[index: string]: T;
}
interface ListIterator<T, TResult> {
(value: T, index: number, list: List<T>): TResult;
}
interface ObjectIterator<T, TResult> {
(element: T, key: string, list: Dictionary<T>): TResult;
}
interface MemoIterator<T, TResult> {
(prev: TResult, curr: T, index: number, list: List<T>): TResult;
}
interface MemoObjectIterator<T, TResult> {
(prev: TResult, curr: T, key: string, list: Dictionary<T>): TResult;
}
interface Cancelable {
cancel() : void;
}
}
interface UnderscoreStatic {
/**
* Underscore OOP Wrapper, all Underscore functions that take an object
* as the first parameter can be invoked through this function.
* @param key First argument to Underscore object functions.
**/
<T>(value: _.Dictionary<T>): Underscore<T>;
<T>(value: Array<T>): Underscore<T>;
<T>(value: T): Underscore<T>;
/* *************
* Collections *
************* */
/**
* Iterates over a list of elements, yielding each in turn to an iterator function. The iterator is
* bound to the context object, if one is passed. Each invocation of iterator is called with three
* arguments: (element, index, list). If list is a JavaScript object, iterator's arguments will be
* (value, key, object). Delegates to the native forEach function if it exists.
* @param list Iterates over this list of elements.
* @param iterator Iterator function for each element `list`.
* @param context 'this' object in `iterator`, optional.
**/
each<T>(
list: _.List<T>,
iterator: _.ListIterator<T, void>,
context?: any): _.List<T>;
/**
* @see _.each
* @param object Iterates over properties of this object.
* @param iterator Iterator function for each property on `object`.
* @param context 'this' object in `iterator`, optional.
**/
each<T>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, void>,
context?: any): _.Dictionary<T>;
/**
* @see _.each
**/
forEach<T>(
list: _.List<T>,
iterator: _.ListIterator<T, void>,
context?: any): _.List<T>;
/**
* @see _.each
**/
forEach<T>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, void>,
context?: any): _.Dictionary<T>;
/**
* Produces a new array of values by mapping each value in list through a transformation function
* (iterator). If the native map method exists, it will be used instead. If list is a JavaScript
* object, iterator's arguments will be (value, key, object).
* @param list Maps the elements of this array.
* @param iterator Map iterator function for each element in `list`.
* @param context `this` object in `iterator`, optional.
* @return The mapped array result.
**/
map<T, TResult>(
list: _.List<T>,
iterator: _.ListIterator<T, TResult>,
context?: any): TResult[];
/**
* @see _.map
* @param object Maps the properties of this object.
* @param iterator Map iterator function for each property on `object`.
* @param context `this` object in `iterator`, optional.
* @return The mapped object result.
**/
map<T, TResult>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, TResult>,
context?: any): TResult[];
/**
* @see _.map
**/
collect<T, TResult>(
list: _.List<T>,
iterator: _.ListIterator<T, TResult>,
context?: any): TResult[];
/**
* @see _.map
**/
collect<T, TResult>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, TResult>,
context?: any): TResult[];
/**
* Also known as inject and foldl, reduce boils down a list of values into a single value.
* Memo is the initial state of the reduction, and each successive step of it should be
* returned by iterator. The iterator is passed four arguments: the memo, then the value
* and index (or key) of the iteration, and finally a reference to the entire list.
* @param list Reduces the elements of this array.
* @param iterator Reduce iterator function for each element in `list`.
* @param memo Initial reduce state.
* @param context `this` object in `iterator`, optional.
* @return Reduced object result.
**/
reduce<T, TResult>(
list: _.Collection<T>,
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;
reduce<T, TResult>(
list: _.Dictionary<T>,
iterator: _.MemoObjectIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;
/**
* @see _.reduce
**/
inject<T, TResult>(
list: _.Collection<T>,
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;
/**
* @see _.reduce
**/
foldl<T, TResult>(
list: _.Collection<T>,
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;
/**
* The right-associative version of reduce. Delegates to the JavaScript 1.8 version of
* reduceRight, if it exists. `foldr` is not as useful in JavaScript as it would be in a
* language with lazy evaluation.
* @param list Reduces the elements of this array.
* @param iterator Reduce iterator function for each element in `list`.
* @param memo Initial reduce state.
* @param context `this` object in `iterator`, optional.
* @return Reduced object result.
**/
reduceRight<T, TResult>(
list: _.Collection<T>,
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;
/**
* @see _.reduceRight
**/
foldr<T, TResult>(
list: _.Collection<T>,
iterator: _.MemoIterator<T, TResult>,
memo?: TResult,
context?: any): TResult;
/**
* Looks through each value in the list, returning the first one that passes a truth
* test (iterator). The function returns as soon as it finds an acceptable element,
* and doesn't traverse the entire list.
* @param list Searches for a value in this list.
* @param iterator Search iterator function for each element in `list`.
* @param context `this` object in `iterator`, optional.
* @return The first acceptable found element in `list`, if nothing is found undefined/null is returned.
**/
find<T>(
list: _.List<T>,
iterator: _.ListIterator<T, boolean>,
context?: any): T;
/**
* @see _.find
**/
find<T>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, boolean>,
context?: any): T;
/**
* @see _.find
**/
find<T, U extends {}>(
object: _.List<T>|_.Dictionary<T>,
iterator: U): T;
/**
* @see _.find
**/
find<T>(
object: _.List<T>|_.Dictionary<T>,
iterator: string): T;
/**
* @see _.find
**/
detect<T>(
list: _.List<T>,
iterator: _.ListIterator<T, boolean>,
context?: any): T;
/**
* @see _.find
**/
detect<T>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, boolean>,
context?: any): T;
/**
* @see _.find
**/
detect<T, U extends {}>(
object: _.List<T>|_.Dictionary<T>,
iterator: U): T;
/**
* @see _.find
**/
detect<T>(
object: _.List<T>|_.Dictionary<T>,
iterator: string): T;
/**
* Looks through each value in the list, returning an array of all the values that pass a truth
* test (iterator). Delegates to the native filter method, if it exists.
* @param list Filter elements out of this list.
* @param iterator Filter iterator function for each element in `list`.
* @param context `this` object in `iterator`, optional.
* @return The filtered list of elements.
**/
filter<T>(
list: _.List<T>,
iterator: _.ListIterator<T, boolean>,
context?: any): T[];
/**
* @see _.filter
**/
filter<T>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, boolean>,
context?: any): T[];
/**
* @see _.filter
**/
select<T>(
list: _.List<T>,
iterator: _.ListIterator<T, boolean>,
context?: any): T[];
/**
* @see _.filter
**/
select<T>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, boolean>,
context?: any): T[];
/**
* Looks through each value in the list, returning an array of all the values that contain all
* of the key-value pairs listed in properties.
* @param list List to match elements again `properties`.
* @param properties The properties to check for on each element within `list`.
* @return The elements within `list` that contain the required `properties`.
**/
where<T, U extends {}>(
list: _.List<T>,
properties: U): T[];
/**
* Looks through the list and returns the first value that matches all of the key-value pairs listed in properties.
* @param list Search through this list's elements for the first object with all `properties`.
* @param properties Properties to look for on the elements within `list`.
* @return The first element in `list` that has all `properties`.
**/
findWhere<T, U extends {}>(
list: _.List<T>,
properties: U): T;
/**
* Returns the values in list without the elements that the truth test (iterator) passes.
* The opposite of filter.
* Return all the elements for which a truth test fails.
* @param list Reject elements within this list.
* @param iterator Reject iterator function for each element in `list`.
* @param context `this` object in `iterator`, optional.
* @return The rejected list of elements.
**/
reject<T>(
list: _.List<T>,
iterator: _.ListIterator<T, boolean>,
context?: any): T[];
/**
* @see _.reject
**/
reject<T>(
object: _.Dictionary<T>,
iterator: _.ObjectIterator<T, boolean>,
context?: any): T[];
/**
* Returns true if all of the values in the list pass the iterator truth test. Delegates to the
* native method every, if present.
* @param list Truth test against all elements within this list.
* @param iterator Trust test iterator function for each element in `list`.
* @param context `this` object in `iterator`, optional.
* @return True if all elements passed the truth test, otherwise false.
**/
every<T>(
list: _.List<T>,
iterator?: _.ListIterator<T, boolean>,
context?: any): boolean;
/**
* @see _.every
**/
every<T>(
list: _.Dictionary<T>,
iterator?: _.ObjectIterator<T, boolean>,
context?: any): boolean;
/**
* @see _.every
**/
all<T>(
list: _.List<T>,
iterator?: _.ListIterator<T, boolean>,
context?: any): boolean;
/**
* @see _.every
**/
all<T>(
list: _.Dictionary<T>,
iterator?: _.ObjectIterator<T, boolean>,
context?: any): boolean;
/**
* Returns true if any of the values in the list pass the iterator truth test. Short-circuits and
* stops traversing the list if a true element is found. Delegates to the native method some, if present.
* @param list Truth test against all elements within this list.
* @param iterator Trust test iterator function for each element in `list`.
* @param context `this` object in `iterator`, optional.
* @return True if any elements passed the truth test, otherwise false.
**/
some<T>(
list: _.List<T>,
iterator?: _.ListIterator<T, boolean>,
context?: any): boolean;
/**
* @see _.some
**/
some<T>(
object: _.Dictionary<T>,
iterator?: _.ObjectIterator<T, boolean>,
context?: any): boolean;
/**
* @see _.some
**/
any<T>(
list: _.List<T>,
iterator?: _.ListIterator<T, boolean>,
context?: any): boolean;
/**
* @see _.some
**/
any<T>(
object: _.Dictionary<T>,
iterator?: _.ObjectIterator<T, boolean>,
context?: any): boolean;
any<T>(
list: _.List<T>,
value: T): boolean;
/**
* Returns true if the value is present in the list. Uses indexOf internally,
* if list is an Array.
* @param list Checks each element to see if `value` is present.
* @param value The value to check for within `list`.
* @return True if `value` is present in `list`, otherwise false.
**/
contains<T>(
list: _.List<T>,
value: T,
fromIndex?: number): boolean;
/**
* @see _.contains
**/
contains<T>(
object: _.Dictionary<T>,
value: T): boolean;
/**
* @see _.contains
**/
include<T>(
list: _.Collection<T>,
value: T,
fromIndex?: number): boolean;
/**
* @see _.contains
**/
include<T>(
object: _.Dictionary<T>,
value: T): boolean;
/**
* @see _.contains
**/
includes<T>(
list: _.Collection<T>,
value: T,
fromIndex?: number): boolean;
/**
* @see _.contains
**/
includes<T>(
object: _.Dictionary<T>,
value: T): boolean;
/**
* Calls the method named by methodName on each value in the list. Any extra arguments passed to
* invoke will be forwarded on to the method invocation.
* @param list The element's in this list will each have the method `methodName` invoked.
* @param methodName The method's name to call on each element within `list`.
* @param arguments Additional arguments to pass to the method `methodName`.
**/
invoke<T extends {}>(
list: _.List<T>,
methodName: string,
...arguments: any[]): any;
/**
* A convenient version of what is perhaps the most common use-case for map: extracting a list of
* property values.
* @param list The list to pluck elements out of that have the property `propertyName`.
* @param propertyName The property to look for on each element within `list`.
* @return The list of elements within `list` that have the property `propertyName`.
**/
pluck<T extends {}>(
list: _.List<T>,
propertyName: string): any[];
/**
* Returns the maximum value in list.
* @param list Finds the maximum value in this list.
* @return Maximum value in `list`.
**/
max(list: _.List<number>): number;
/**
* @see _.max
*/
max(object: _.Dictionary<number>): number;
/**
* Returns the maximum value in list. If iterator is passed, it will be used on each value to generate
* the criterion by which the value is ranked.
* @param list Finds the maximum value in this list.
* @param iterator Compares each element in `list` to find the maximum value.
* @param context `this` object in `iterator`, optional.
* @return The maximum element within `list`.
**/
max<T>(
list: _.List<T>,
iterator?: _.ListIterator<T, any>,
context?: any): T;
/**
* @see _.max
*/
max<T>(
list: _.Dictionary<T>,
iterator?: _.ObjectIterator<T, any>,
context?: any): T;
/**
* Returns the minimum value in list.
* @param list Finds the minimum value in this list.
* @return Minimum value in `list`.
**/
min(list: _.List<number>): number;
/**
* @see _.min
*/
min(o: _.Dictionary<number>): number;
/**
* Returns the minimum value in list. If iterator is passed, it will be used on each value to generate
* the criterion by which the value is ranked.
* @param list Finds the minimum value in this list.
* @param iterator Compares each element in `list` to find the minimum value.
* @param context `this` object in `iterator`, optional.
* @return The minimum element within `list`.
**/
min<T>(
list: _.List<T>,
iterator?: _.ListIterator<T, any>,
context?: any): T;
/**
* @see _.min
*/
min<T>(
list: _.Dictionary<T>,
iterator?: _.ObjectIterator<T, any>,
context?: any): T;
/**
* Returns a sorted copy of list, ranked in ascending order by the results of running each value
* through iterator. Iterator may also be the string name of the property to sort by (eg. length).
* @param list Sorts this list.
* @param iterator Sort iterator for each element within `list`.
* @param context `this` object in `iterator`, optional.
* @return A sorted copy of `list`.
**/
sortBy<T, TSort>(
list: _.List<T>,
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];
/**
* @see _.sortBy
* @param iterator Sort iterator for each element within `list`.
**/
sortBy<T>(
list: _.List<T>,
iterator: string,
context?: any): T[];
/**
* Splits a collection into sets, grouped by the result of running each value through iterator.
* If iterator is a string instead of a function, groups by the property named by iterator on
* each of the values.
* @param list Groups this list.
* @param iterator Group iterator for each element within `list`, return the key to group the element by.
* @param context `this` object in `iterator`, optional.
* @return An object with the group names as properties where each property contains the grouped elements from `list`.
**/
groupBy<T>(
list: _.List<T>,
iterator?: _.ListIterator<T, any>,
context?: any): _.Dictionary<T[]>;
/**
* @see _.groupBy
* @param iterator Property on each object to group them by.
**/
groupBy<T>(
list: _.List<T>,
iterator: string,
context?: any): _.Dictionary<T[]>;
/**
* Given a `list`, and an `iterator` function that returns a key for each element in the list (or a property name),
* returns an object with an index of each item. Just like _.groupBy, but for when you know your keys are unique.
**/
indexBy<T>(
list: _.List<T>,
iterator: _.ListIterator<T, any>,
context?: any): _.Dictionary<T>;
/**
* @see _.indexBy
* @param iterator Property on each object to index them by.
**/
indexBy<T>(
list: _.List<T>,
iterator: string,
context?: any): _.Dictionary<T>;
/**
* Sorts a list into groups and returns a count for the number of objects in each group. Similar
* to groupBy, but instead of returning a list of values, returns a count for the number of values
* in that group.
* @param list Group elements in this list and then count the number of elements in each group.
* @param iterator Group iterator for each element within `list`, return the key to group the element by.
* @param context `this` object in `iterator`, optional.
* @return An object with the group names as properties where each property contains the number of elements in that group.
**/
countBy<T>(
list: _.List<T>,
iterator?: _.ListIterator<T, any>,
context?: any): _.Dictionary<number>;
/**
* @see _.countBy
* @param iterator Function name
**/
countBy<T>(
list: _.List<T>,
iterator: string,
context?: any): _.Dictionary<number>;
/**
* Returns a shuffled copy of the list, using a version of the Fisher-Yates shuffle.
* @param list List to shuffle.
* @return Shuffled copy of `list`.
**/
shuffle<T>(list: _.Collection<T>): T[];
/**
* Produce a random sample from the `list`. Pass a number to return `n` random elements from the list. Otherwise a single random item will be returned.
* @param list List to sample.
* @return Random sample of `n` elements in `list`.
**/
sample<T>(list: _.Collection<T>, n: number): T[];
/**
* @see _.sample
**/
sample<T>(list: _.Collection<T>): T;
/**
* Converts the list (anything that can be iterated over), into a real Array. Useful for transmuting
* the arguments object.
* @param list object to transform into an array.
* @return `list` as an array.
**/
toArray<T>(list: _.Collection<T>): T[];
/**
* Return the number of values in the list.
* @param list Count the number of values/elements in this list.
* @return Number of values in `list`.
**/
size<T>(list: _.Collection<T>): number;
/**
* Split array into two arrays:
* one whose elements all satisfy predicate and one whose elements all do not satisfy predicate.
* @param array Array to split in two.
* @param iterator Filter iterator function for each element in `array`.
* @param context `this` object in `iterator`, optional.
* @return Array where Array[0] are the elements in `array` that satisfies the predicate, and Array[1] the elements that did not.
**/
partition<T>(
array: Array<T>,
iterator: _.ListIterator<T, boolean>,
context?: any): T[][];
/*********
* Arrays *
**********/
/**
* Returns the first element of an array. Passing n will return the first n elements of the array.
* @param array Retrieves the first element of this array.
* @return Returns the first element of `array`.
**/
first<T>(array: _.List<T>): T;
/**
* @see _.first
* @param n Return more than one element from `array`.
**/
first<T>(
array: _.List<T>,
n: number): T[];
/**
* @see _.first
**/
head<T>(array: _.List<T>): T;
/**
* @see _.first
**/
head<T>(
array: _.List<T>,
n: number): T[];
/**
* @see _.first
**/
take<T>(array: _.List<T>): T;
/**
* @see _.first
**/
take<T>(
array: _.List<T>,
n: number): T[];
/**
* Returns everything but the last entry of the array. Especially useful on the arguments object.
* Pass n to exclude the last n elements from the result.
* @param array Retrieve all elements except the last `n`.
* @param n Leaves this many elements behind, optional.
* @return Returns everything but the last `n` elements of `array`.
**/
initial<T>(
array: _.List<T>,
n?: number): T[];
/**
* Returns the last element of an array. Passing n will return the last n elements of the array.
* @param array Retrieves the last element of this array.
* @return Returns the last element of `array`.
**/
last<T>(array: _.List<T>): T;
/**
* @see _.last
* @param n Return more than one element from `array`.
**/
last<T>(
array: _.List<T>,
n: number): T[];
/**
* Returns the rest of the elements in an array. Pass an index to return the values of the array
* from that index onward.
* @param array The array to retrieve all but the first `index` elements.
* @param n The index to start retrieving elements forward from, optional, default = 1.
* @return Returns the elements of `array` from `index` to the end of `array`.
**/
rest<T>(
array: _.List<T>,
n?: number): T[];
/**
* @see _.rest
**/
tail<T>(
array: _.List<T>,
n?: number): T[];
/**
* @see _.rest
**/
drop<T>(
array: _.List<T>,
n?: number): T[];
/**
* Returns a copy of the array with all falsy values removed. In JavaScript, false, null, 0, "",
* undefined and NaN are all falsy.
* @param array Array to compact.
* @return Copy of `array` without false values.
**/
compact<T>(array: _.List<T>): T[];
/**
* Flattens a nested array (the nesting can be to any depth). If you pass shallow, the array will
* only be flattened a single level.
* @param array The array to flatten.
* @param shallow If true then only flatten one level, optional, default = false.
* @return `array` flattened.
**/
flatten(
array: _.List<any>,
shallow?: boolean): any[];
/**
* Returns a copy of the array with all instances of the values removed.
* @param array The array to remove `values` from.
* @param values The values to remove from `array`.
* @return Copy of `array` without `values`.
**/
without<T>(
array: _.List<T>,
...values: T[]): T[];
/**
* Computes the union of the passed-in arrays: the list of unique items, in order, that are
* present in one or more of the arrays.
* @param arrays Array of arrays to compute the union of.
* @return The union of elements within `arrays`.
**/
union<T>(...arrays: _.List<T>[]): T[];
/**
* Computes the list of values that are the intersection of all the arrays. Each value in the result
* is present in each of the arrays.
* @param arrays Array of arrays to compute the intersection of.
* @return The intersection of elements within `arrays`.
**/
intersection<T>(...arrays: _.List<T>[]): T[];
/**
* Similar to without, but returns the values from array that are not present in the other arrays.
* @param array Keeps values that are within `others`.
* @param others The values to keep within `array`.
* @return Copy of `array` with only `others` values.
**/
difference<T>(
array: _.List<T>,
...others: _.List<T>[]): T[];
/**
* Produces a duplicate-free version of the array, using === to test object equality. If you know in
* advance that the array is sorted, passing true for isSorted will run a much faster algorithm. If
* you want to compute unique items based on a transformation, pass an iterator function.
* @param array Array to remove duplicates from.
* @param isSorted True if `array` is already sorted, optional, default = false.
* @param iterator Transform the elements of `array` before comparisons for uniqueness.
* @param context 'this' object in `iterator`, optional.
* @return Copy of `array` where all elements are unique.
**/
uniq<T, TSort>(
array: _.List<T>,
isSorted?: boolean,
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];
/**
* @see _.uniq
**/
uniq<T, TSort>(
array: _.List<T>,
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];
/**
* @see _.uniq
**/
unique<T, TSort>(
array: _.List<T>,
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];
/**
* @see _.uniq
**/
unique<T, TSort>(
array: _.List<T>,
isSorted?: boolean,
iterator?: _.ListIterator<T, TSort>,
context?: any): T[];
/**
* Merges together the values of each of the arrays with the values at the corresponding position.
* Useful when you have separate data sources that are coordinated through matching array indexes.
* If you're working with a matrix of nested arrays, zip.apply can transpose the matrix in a similar fashion.
* @param arrays The arrays to merge/zip.
* @return Zipped version of `arrays`.
**/
zip(...arrays: any[][]): any[][];
/**
* @see _.zip
**/
zip(...arrays: any[]): any[];
/**
* The opposite of zip. Given a number of arrays, returns a series of new arrays, the first
* of which contains all of the first elements in the input arrays, the second of which
* contains all of the second elements, and so on. Use with apply to pass in an array
* of arrays
* @param arrays The arrays to unzip.
* @return Unzipped version of `arrays`.
**/
unzip(...arrays: any[][]): any[][];
/**
* Converts arrays into objects. Pass either a single list of [key, value] pairs, or a
* list of keys, and a list of values.
* @param keys Key array.
* @param values Value array.
* @return An object containing the `keys` as properties and `values` as the property values.
**/
object<TResult extends {}>(
keys: _.List<string>,
values: _.List<any>): TResult;
/**
* Converts arrays into objects. Pass either a single list of [key, value] pairs, or a
* list of keys, and a list of values.
* @param keyValuePairs Array of [key, value] pairs.
* @return An object containing the `keys` as properties and `values` as the property values.
**/
object<TResult extends {}>(...keyValuePairs: any[][]): TResult;
/**
* @see _.object
**/
object<TResult extends {}>(
list: _.List<any>,
values?: any): TResult;
/**
* Returns the index at which value can be found in the array, or -1 if value is not present in the array.
* Uses the native indexOf function unless it's missing. If you're working with a large array, and you know
* that the array is already sorted, pass true for isSorted to use a faster binary search ... or, pass a number
* as the third argument in order to look for the first matching value in the array after the given index.
* @param array The array to search for the index of `value`.
* @param value The value to search for within `array`.
* @param isSorted True if the array is already sorted, optional, default = false.
* @return The index of `value` within `array`.
**/
indexOf<T>(
array: _.List<T>,
value: T,
isSorted?: boolean): number;
/**
* @see _indexof
**/
indexOf<T>(
array: _.List<T>,
value: T,
startFrom: number): number;
/**
* Returns the index of the last occurrence of value in the array, or -1 if value is not present. Uses the
* native lastIndexOf function if possible. Pass fromIndex to start your search at a given index.
* @param array The array to search for the last index of `value`.
* @param value The value to search for within `array`.
* @param from The starting index for the search, optional.
* @return The index of the last occurrence of `value` within `array`.
**/
lastIndexOf<T>(
array: _.List<T>,
value: T,
from?: number): number;
/**
* Returns the first index of an element in `array` where the predicate truth test passes
* @param array The array to search for the index of the first element where the predicate truth test passes.
* @param predicate Predicate function.
* @param context `this` object in `predicate`, optional.
* @return Returns the index of an element in `array` where the predicate truth test passes or -1.`
**/
findIndex<T>(
array: _.List<T>,
predicate: _.ListIterator<T, boolean> | {},
context?: any): number;
/**
* Returns the last index of an element in `array` where the predicate truth test passes
* @param array The array to search for the index of the last element where the predicate truth test passes.
* @param predicate Predicate function.
* @param context `this` object in `predicate`, optional.
* @return Returns the index of an element in `array` where the predicate truth test passes or -1.`
**/
findLastIndex<T>(
array: _.List<T>,
predicate: _.ListIterator<T, boolean> | {},
context?: any): number;
/**
* Uses a binary search to determine the index at which the value should be inserted into the list in order
* to maintain the list's sorted order. If an iterator is passed, it will be used to compute the sort ranking
* of each value, including the value you pass.
* @param list The sorted list.
* @param value The value to determine its index within `list`.
* @param iterator Iterator to compute the sort ranking of each value, optional.
* @return The index where `value` should be inserted into `list`.
**/
sortedIndex<T, TSort>(
list: _.List<T>,
value: T,
iterator?: (x: T) => TSort, context?: any): number;
/**
* A function to create flexibly-numbered lists of integers, handy for each and map loops. start, if omitted,
* defaults to 0; step defaults to 1. Returns a list of integers from start to stop, incremented (or decremented)
* by step, exclusive.
* @param start Start here.
* @param stop Stop here.
* @param step The number to count up by each iteration, optional, default = 1.
* @return Array of numbers from `start` to `stop` with increments of `step`.
**/
range(
start: number,
stop: number,
step?: number): number[];
/**
* @see _.range
* @param stop Stop here.
* @return Array of numbers from 0 to `stop` with increments of 1.
* @note If start is not specified the implementation will never pull the step (step = arguments[2] || 0)
**/
range(stop: number): number[];
/**
* Split an **array** into several arrays containing **count** or less elements
* of initial array.
* @param array The array to split
* @param count The maximum size of the inner arrays.
*/
chunk<T>(array: _.Collection<T>, count: number): (_.Collection<T>)[]
/*************
* Functions *
*************/
/**
* Bind a function to an object, meaning that whenever the function is called, the value of this will
* be the object. Optionally, bind arguments to the function to pre-fill them, also known as partial application.
* @param func The function to bind `this` to `object`.
* @param context The `this` pointer whenever `fn` is called.
* @param arguments Additional arguments to pass to `fn` when called.
* @return `fn` with `this` bound to `object`.
**/
bind(
func: Function,
context: any,
...arguments: any[]): () => any;
/**
* Binds a number of methods on the object, specified by methodNames, to be run in the context of that object
* whenever they are invoked. Very handy for binding functions that are going to be used as event handlers,
* which would otherwise be invoked with a fairly useless this. If no methodNames are provided, all of the
* object's function properties will be bound to it.
* @param object The object to bind the methods `methodName` to.
* @param methodNames The methods to bind to `object`, optional and if not provided all of `object`'s
* methods are bound.
**/
bindAll(
object: any,
...methodNames: string[]): any;
/**
* Partially apply a function by filling in any number of its arguments, without changing its dynamic this value.
* A close cousin of bind. You may pass _ in your list of arguments to specify an argument that should not be
* pre-filled, but left open to supply at call-time.
* @param fn Function to partially fill in arguments.
* @param arguments The partial arguments.
* @return `fn` with partially filled in arguments.
**/
partial<T1, T2>(
fn: { (p1: T1):T2 },
p1: T1
): { (): T2 };
partial<T1, T2, T3>(
fn: { (p1: T1, p2: T2):T3 },
p1: T1
): { (p2: T2): T3 };
partial<T1, T2, T3>(
fn: { (p1: T1, p2: T2):T3 },
p1: T1,
p2: T2
): { (): T3 };
partial<T1, T2, T3>(
fn: { (p1: T1, p2: T2):T3 },
stub1: UnderscoreStatic,
p2: T2
): { (p1: T1): T3 };
partial<T1, T2, T3, T4>(
fn: { (p1: T1, p2: T2, p3: T3):T4 },
p1: T1
): { (p2: T2, p3: T3): T4 };
partial<T1, T2, T3, T4>(
fn: { (p1: T1, p2: T2, p3: T3):T4 },
p1: T1,
p2: T2
): { (p3: T3): T4 };
partial<T1, T2, T3, T4>(
fn: { (p1: T1, p2: T2, p3: T3):T4 },
stub1: UnderscoreStatic,
p2: T2
): { (p1: T1, p3: T3): T4 };
partial<T1, T2, T3, T4>(
fn: { (p1: T1, p2: T2, p3: T3):T4 },
p1: T1,
p2: T2,
p3: T3
): { (): T4 };
partial<T1, T2, T3, T4>(
fn: { (p1: T1, p2: T2, p3: T3):T4 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3
): { (p1: T1): T4 };
partial<T1, T2, T3, T4>(
fn: { (p1: T1, p2: T2, p3: T3):T4 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3
): { (p2: T2): T4 };
partial<T1, T2, T3, T4>(
fn: { (p1: T1, p2: T2, p3: T3):T4 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3
): { (p1: T1, p2: T2): T4 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
p1: T1
): { (p2: T2, p3: T3, p4: T4): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
p1: T1,
p2: T2
): { (p3: T3, p4: T4): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
stub1: UnderscoreStatic,
p2: T2
): { (p1: T1, p3: T3, p4: T4): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
p1: T1,
p2: T2,
p3: T3
): { (p4: T4): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3
): { (p1: T1, p4: T4): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3
): { (p2: T2, p4: T4): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3
): { (p1: T1, p2: T2, p4: T4): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
p1: T1,
p2: T2,
p3: T3,
p4: T4
): { (): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3,
p4: T4
): { (p1: T1): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3,
p4: T4
): { (p2: T2): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3,
p4: T4
): { (p1: T1, p2: T2): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
p1: T1,
p2: T2,
stub3: UnderscoreStatic,
p4: T4
): { (p3: T3): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
stub1: UnderscoreStatic,
p2: T2,
stub3: UnderscoreStatic,
p4: T4
): { (p1: T1, p3: T3): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
p1: T1,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4
): { (p2: T2, p3: T3): T5 };
partial<T1, T2, T3, T4, T5>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4):T5 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4
): { (p1: T1, p2: T2, p3: T3): T5 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1
): { (p2: T2, p3: T3, p4: T4, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
p2: T2
): { (p3: T3, p4: T4, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
p2: T2
): { (p1: T1, p3: T3, p4: T4, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
p2: T2,
p3: T3
): { (p4: T4, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3
): { (p1: T1, p4: T4, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3
): { (p2: T2, p4: T4, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3
): { (p1: T1, p2: T2, p4: T4, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
p2: T2,
p3: T3,
p4: T4
): { (p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3,
p4: T4
): { (p1: T1, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3,
p4: T4
): { (p2: T2, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3,
p4: T4
): { (p1: T1, p2: T2, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
p2: T2,
stub3: UnderscoreStatic,
p4: T4
): { (p3: T3, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
p2: T2,
stub3: UnderscoreStatic,
p4: T4
): { (p1: T1, p3: T3, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4
): { (p2: T2, p3: T3, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4
): { (p1: T1, p2: T2, p3: T3, p5: T5): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
p2: T2,
p3: T3,
p4: T4,
p5: T5
): { (): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3,
p4: T4,
p5: T5
): { (p1: T1): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3,
p4: T4,
p5: T5
): { (p2: T2): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3,
p4: T4,
p5: T5
): { (p1: T1, p2: T2): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
p2: T2,
stub3: UnderscoreStatic,
p4: T4,
p5: T5
): { (p3: T3): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
p2: T2,
stub3: UnderscoreStatic,
p4: T4,
p5: T5
): { (p1: T1, p3: T3): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4,
p5: T5
): { (p2: T2, p3: T3): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4,
p5: T5
): { (p1: T1, p2: T2, p3: T3): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
p2: T2,
p3: T3,
stub4: UnderscoreStatic,
p5: T5
): { (p4: T4): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3,
stub4: UnderscoreStatic,
p5: T5
): { (p1: T1, p4: T4): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3,
stub4: UnderscoreStatic,
p5: T5
): { (p2: T2, p4: T4): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3,
stub4: UnderscoreStatic,
p5: T5
): { (p1: T1, p2: T2, p4: T4): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
p2: T2,
stub3: UnderscoreStatic,
stub4: UnderscoreStatic,
p5: T5
): { (p3: T3, p4: T4): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
p2: T2,
stub3: UnderscoreStatic,
stub4: UnderscoreStatic,
p5: T5
): { (p1: T1, p3: T3, p4: T4): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
p1: T1,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
stub4: UnderscoreStatic,
p5: T5
): { (p2: T2, p3: T3, p4: T4): T6 };
partial<T1, T2, T3, T4, T5, T6>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5):T6 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
stub4: UnderscoreStatic,
p5: T5
): { (p1: T1, p2: T2, p3: T3, p4: T4): T6 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1
): { (p2: T2, p3: T3, p4: T4, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2
): { (p3: T3, p4: T4, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2
): { (p1: T1, p3: T3, p4: T4, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2,
p3: T3
): { (p4: T4, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3
): { (p1: T1, p4: T4, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3
): { (p2: T2, p4: T4, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3
): { (p1: T1, p2: T2, p4: T4, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2,
p3: T3,
p4: T4
): { (p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3,
p4: T4
): { (p1: T1, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3,
p4: T4
): { (p2: T2, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3,
p4: T4
): { (p1: T1, p2: T2, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2,
stub3: UnderscoreStatic,
p4: T4
): { (p3: T3, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2,
stub3: UnderscoreStatic,
p4: T4
): { (p1: T1, p3: T3, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4
): { (p2: T2, p3: T3, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4
): { (p1: T1, p2: T2, p3: T3, p5: T5, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2,
p3: T3,
p4: T4,
p5: T5
): { (p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3,
p4: T4,
p5: T5
): { (p1: T1, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3,
p4: T4,
p5: T5
): { (p2: T2, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3,
p4: T4,
p5: T5
): { (p1: T1, p2: T2, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2,
stub3: UnderscoreStatic,
p4: T4,
p5: T5
): { (p3: T3, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2,
stub3: UnderscoreStatic,
p4: T4,
p5: T5
): { (p1: T1, p3: T3, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4,
p5: T5
): { (p2: T2, p3: T3, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
p4: T4,
p5: T5
): { (p1: T1, p2: T2, p3: T3, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2,
p3: T3,
stub4: UnderscoreStatic,
p5: T5
): { (p4: T4, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3,
stub4: UnderscoreStatic,
p5: T5
): { (p1: T1, p4: T4, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3,
stub4: UnderscoreStatic,
p5: T5
): { (p2: T2, p4: T4, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3,
stub4: UnderscoreStatic,
p5: T5
): { (p1: T1, p2: T2, p4: T4, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2,
stub3: UnderscoreStatic,
stub4: UnderscoreStatic,
p5: T5
): { (p3: T3, p4: T4, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2,
stub3: UnderscoreStatic,
stub4: UnderscoreStatic,
p5: T5
): { (p1: T1, p3: T3, p4: T4, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
stub4: UnderscoreStatic,
p5: T5
): { (p2: T2, p3: T3, p4: T4, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
stub3: UnderscoreStatic,
stub4: UnderscoreStatic,
p5: T5
): { (p1: T1, p2: T2, p3: T3, p4: T4, p6: T6): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
p2: T2,
p3: T3,
p4: T4,
p5: T5,
p6: T6
): { (): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
p2: T2,
p3: T3,
p4: T4,
p5: T5,
p6: T6
): { (p1: T1): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,
stub2: UnderscoreStatic,
p3: T3,
p4: T4,
p5: T5,
p6: T6
): { (p2: T2): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
stub1: UnderscoreStatic,
stub2: UnderscoreStatic,
p3: T3,
p4: T4,
p5: T5,
p6: T6
): { (p1: T1, p2: T2): T7 };
partial<T1, T2, T3, T4, T5, T6, T7>(
fn: { (p1: T1, p2: T2, p3: T3, p4: T4, p5: T5, p6: T6):T7 },
p1: T1,