blob: 777deb259a56d0f6a34d80c77bf28bf53935bffb [file] [log] [blame]
// Type definitions for Lo-Dash
// Project: http://lodash.com/
// Definitions by: Brian Zengel <https://github.com/bczengel>, Ilya Mochalov <https://github.com/chrootsu>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var _: _.LoDashStatic;
declare module _ {
interface LoDashStatic {
/**
* Creates a lodash object which wraps the given value to enable intuitive method chaining.
*
* In addition to Lo-Dash methods, wrappers also have the following Array methods:
* concat, join, pop, push, reverse, shift, slice, sort, splice, and unshift
*
* Chaining is supported in custom builds as long as the value method is implicitly or
* explicitly included in the build.
*
* The chainable wrapper functions are:
* after, assign, bind, bindAll, bindKey, chain, chunk, compact, compose, concat, countBy,
* createCallback, curry, debounce, defaults, defer, delay, difference, filter, flatten,
* forEach, forEachRight, forIn, forInRight, forOwn, forOwnRight, functions, groupBy,
* indexBy, initial, intersection, invert, invoke, keys, map, max, memoize, merge, min,
* object, omit, once, pairs, partial, partialRight, pick, pluck, pull, push, range, reject,
* remove, rest, reverse, sample, shuffle, slice, sort, sortBy, splice, tap, throttle, times,
* toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip
*
* The non-chainable wrapper functions are:
* clone, cloneDeep, contains, escape, every, find, findIndex, findKey, findLast,
* findLastIndex, findLastKey, has, identity, indexOf, isArguments, isArray, isBoolean,
* isDate, isElement, isEmpty, isEqual, isFinite, isFunction, isNaN, isNull, isNumber,
* isObject, isPlainObject, isRegExp, isString, isUndefined, join, lastIndexOf, mixin,
* noConflict, parseInt, pop, random, reduce, reduceRight, result, shift, size, some,
* sortedIndex, runInContext, template, unescape, uniqueId, and value
*
* The wrapper functions first and last return wrapped values when n is provided, otherwise
* they return unwrapped values.
*
* Explicit chaining can be enabled by using the _.chain method.
**/
(value: number): LoDashImplicitWrapper<number>;
(value: string): LoDashImplicitStringWrapper;
(value: boolean): LoDashImplicitWrapper<boolean>;
(value: Array<number>): LoDashImplicitNumberArrayWrapper;
<T>(value: Array<T>): LoDashImplicitArrayWrapper<T>;
<T extends {}>(value: T): LoDashImplicitObjectWrapper<T>;
(value: any): LoDashImplicitWrapper<any>;
/**
* The semantic version number.
**/
VERSION: string;
/**
* An object used to flag environments features.
**/
support: Support;
/**
* By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
* (ERB). Change the following template settings to use alternative delimiters.
**/
templateSettings: TemplateSettings;
}
/**
* By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
* (ERB). Change the following template settings to use alternative delimiters.
**/
interface TemplateSettings {
/**
* The "escape" delimiter.
**/
escape?: RegExp;
/**
* The "evaluate" delimiter.
**/
evaluate?: RegExp;
/**
* An object to import into the template as local variables.
**/
imports?: Dictionary<any>;
/**
* The "interpolate" delimiter.
**/
interpolate?: RegExp;
/**
* Used to reference the data object in the template text.
**/
variable?: string;
}
/**
* Creates a cache object to store key/value pairs.
*/
interface MapCache {
/**
* Removes `key` and its value from the cache.
* @param key The key of the value to remove.
* @return Returns `true` if the entry was removed successfully, else `false`.
*/
delete(key: string): boolean;
/**
* Gets the cached value for `key`.
* @param key The key of the value to get.
* @return Returns the cached value.
*/
get(key: string): any;
/**
* Checks if a cached value for `key` exists.
* @param key The key of the entry to check.
* @return Returns `true` if an entry for `key` exists, else `false`.
*/
has(key: string): boolean;
/**
* Sets `value` to `key` of the cache.
* @param key The key of the value to cache.
* @param value The value to cache.
* @return Returns the cache object.
*/
set(key: string, value: any): _.Dictionary<any>;
}
/**
* An object used to flag environments features.
**/
interface Support {
/**
* Detect if an arguments object's [[Class]] is resolvable (all but Firefox < 4, IE < 9).
**/
argsClass: boolean;
/**
* Detect if arguments objects are Object objects (all but Narwhal and Opera < 10.5).
**/
argsObject: boolean;
/**
* Detect if name or message properties of Error.prototype are enumerable by default.
* (IE < 9, Safari < 5.1)
**/
enumErrorProps: boolean;
/**
* Detect if prototype properties are enumerable by default.
*
* Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 (if the prototype or a property on the
* prototype has been set) incorrectly set the [[Enumerable]] value of a function’s prototype property to true.
**/
enumPrototypes: boolean;
/**
* Detect if Function#bind exists and is inferred to be fast (all but V8).
**/
fastBind: boolean;
/**
* Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera
* mobile browsers & avoided in Windows 8 apps).
**/
funcDecomp: boolean;
/**
* Detect if Function#name is supported (all but IE).
**/
funcNames: boolean;
/**
* Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS,
* Safari < 5.1).
**/
nonEnumArgs: boolean;
/**
* Detect if properties shadowing those on Object.prototype are non-enumerable.
*
* In IE < 9 an objects own properties, shadowing non-enumerable ones, are made
* non-enumerable as well (a.k.a the JScript [[DontEnum]] bug).
**/
nonEnumShadows: boolean;
/**
* Detect if own properties are iterated after inherited properties (all but IE < 9).
**/
ownLast: boolean;
/**
* Detect if Array#shift and Array#splice augment array-like objects correctly.
*
* Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array shift() and splice()
* functions that fail to remove the last element, value[0], of array-like objects even
* though the length property is set to 0. The shift() method is buggy in IE 8 compatibility
* mode, while splice() is buggy regardless of mode in IE < 9 and buggy in compatibility mode
* in IE 9.
**/
spliceObjects: boolean;
/**
* Detect lack of support for accessing string characters by index.
*
* IE < 8 can't access characters by index and IE 8 can only access characters by index on
* string literals.
**/
unindexedChars: boolean;
}
interface LoDashWrapperBase<T, TWrapper> { }
interface LoDashImplicitWrapperBase<T, TWrapper> extends LoDashWrapperBase<T, TWrapper> { }
interface LoDashExplicitWrapperBase<T, TWrapper> extends LoDashWrapperBase<T, TWrapper> { }
interface LoDashImplicitWrapper<T> extends LoDashImplicitWrapperBase<T, LoDashImplicitWrapper<T>> { }
interface LoDashExplicitWrapper<T> extends LoDashExplicitWrapperBase<T, LoDashExplicitWrapper<T>> { }
interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper<string> { }
interface LoDashExplicitStringWrapper extends LoDashExplicitWrapper<string> { }
interface LoDashImplicitObjectWrapper<T> extends LoDashImplicitWrapperBase<T, LoDashImplicitObjectWrapper<T>> { }
interface LoDashExplicitObjectWrapper<T> extends LoDashExplicitWrapperBase<T, LoDashExplicitObjectWrapper<T>> { }
interface LoDashImplicitArrayWrapper<T> extends LoDashImplicitWrapperBase<T[], LoDashImplicitArrayWrapper<T>> {
join(seperator?: string): string;
pop(): T;
push(...items: T[]): LoDashImplicitArrayWrapper<T>;
shift(): T;
sort(compareFn?: (a: T, b: T) => number): LoDashImplicitArrayWrapper<T>;
splice(start: number): LoDashImplicitArrayWrapper<T>;
splice(start: number, deleteCount: number, ...items: any[]): LoDashImplicitArrayWrapper<T>;
unshift(...items: T[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> extends LoDashExplicitWrapperBase<T[], LoDashExplicitArrayWrapper<T>> { }
interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper<number> { }
interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper<number> { }
/*********
* Array *
*********/
//_.chunk
interface LoDashStatic {
/**
* Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the
* final chunk will be the remaining elements.
*
* @param array The array to process.
* @param size The length of each chunk.
* @return Returns the new array containing chunks.
*/
chunk<T>(
array: List<T>,
size?: number
): T[][];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.chunk
*/
chunk(size?: number): LoDashImplicitArrayWrapper<T[]>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.chunk
*/
chunk<TResult>(size?: number): LoDashImplicitArrayWrapper<TResult[]>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.chunk
*/
chunk(size?: number): LoDashExplicitArrayWrapper<T[]>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.chunk
*/
chunk<TResult>(size?: number): LoDashExplicitArrayWrapper<TResult[]>;
}
//_.compact
interface LoDashStatic {
/**
* Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are
* falsey.
*
* @param array The array to compact.
* @return (Array) Returns the new array of filtered values.
*/
compact<T>(array?: List<T>): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.compact
*/
compact(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.compact
*/
compact<TResult>(): LoDashImplicitArrayWrapper<TResult>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.compact
*/
compact(): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.compact
*/
compact<TResult>(): LoDashExplicitArrayWrapper<TResult>;
}
//_.difference
interface LoDashStatic {
/**
* Creates an array of unique array values not included in the other provided arrays using SameValueZero for
* equality comparisons.
*
* @param array The array to inspect.
* @param values The arrays of values to exclude.
* @return Returns the new array of filtered values.
*/
difference<T>(
array: T[]|List<T>,
...values: (T[]|List<T>)[]
): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.difference
*/
difference(...values: (T[]|List<T>)[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.difference
*/
difference<TValue>(...values: (TValue[]|List<TValue>)[]): LoDashImplicitArrayWrapper<TValue>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.difference
*/
difference(...values: (T[]|List<T>)[]): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.difference
*/
difference<TValue>(...values: (TValue[]|List<TValue>)[]): LoDashExplicitArrayWrapper<TValue>;
}
//_.drop
interface LoDashStatic {
/**
* Creates a slice of array with n elements dropped from the beginning.
*
* @param array The array to query.
* @param n The number of elements to drop.
* @return Returns the slice of array.
*/
drop<T>(array: T[]|List<T>, n?: number): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.drop
*/
drop(n?: number): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.drop
*/
drop<T>(n?: number): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.drop
*/
drop(n?: number): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.drop
*/
drop<T>(n?: number): LoDashExplicitArrayWrapper<T>;
}
//_.dropRight
interface LoDashStatic {
/**
* Creates a slice of array with n elements dropped from the end.
*
* @param array The array to query.
* @param n The number of elements to drop.
* @return Returns the slice of array.
*/
dropRight<T>(
array: List<T>,
n?: number
): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.dropRight
*/
dropRight(n?: number): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.dropRight
*/
dropRight<TResult>(n?: number): LoDashImplicitArrayWrapper<TResult>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.dropRight
*/
dropRight(n?: number): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.dropRight
*/
dropRight<TResult>(n?: number): LoDashExplicitArrayWrapper<TResult>;
}
//_.dropRightWhile
interface LoDashStatic {
/**
* Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate
* returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* match the properties of the given object, else false.
*
* @param array The array to query.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the slice of array.
*/
dropRightWhile<TValue>(
array: List<TValue>,
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): TValue[];
/**
* @see _.dropRightWhile
*/
dropRightWhile<TValue>(
array: List<TValue>,
predicate?: string,
thisArg?: any
): TValue[];
/**
* @see _.dropRightWhile
*/
dropRightWhile<TWhere, TValue>(
array: List<TValue>,
predicate?: TWhere
): TValue[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.dropRightWhile
*/
dropRightWhile(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.dropRightWhile
*/
dropRightWhile(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.dropRightWhile
*/
dropRightWhile<TWhere>(
predicate?: TWhere
): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.dropRightWhile
*/
dropRightWhile<TValue>(
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<TValue>;
/**
* @see _.dropRightWhile
*/
dropRightWhile<TValue>(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<TValue>;
/**
* @see _.dropRightWhile
*/
dropRightWhile<TWhere, TValue>(
predicate?: TWhere
): LoDashImplicitArrayWrapper<TValue>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.dropRightWhile
*/
dropRightWhile(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.dropRightWhile
*/
dropRightWhile(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.dropRightWhile
*/
dropRightWhile<TWhere>(
predicate?: TWhere
): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.dropRightWhile
*/
dropRightWhile<TValue>(
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<TValue>;
/**
* @see _.dropRightWhile
*/
dropRightWhile<TValue>(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<TValue>;
/**
* @see _.dropRightWhile
*/
dropRightWhile<TWhere, TValue>(
predicate?: TWhere
): LoDashExplicitArrayWrapper<TValue>;
}
//_.dropWhile
interface LoDashStatic {
/**
* Creates a slice of array excluding elements dropped from the beginning. Elements are dropped until predicate
* returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to query.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the slice of array.
*/
dropWhile<TValue>(
array: List<TValue>,
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): TValue[];
/**
* @see _.dropWhile
*/
dropWhile<TValue>(
array: List<TValue>,
predicate?: string,
thisArg?: any
): TValue[];
/**
* @see _.dropWhile
*/
dropWhile<TWhere, TValue>(
array: List<TValue>,
predicate?: TWhere
): TValue[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.dropWhile
*/
dropWhile(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.dropWhile
*/
dropWhile(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.dropWhile
*/
dropWhile<TWhere>(
predicate?: TWhere
): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.dropWhile
*/
dropWhile<TValue>(
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<TValue>;
/**
* @see _.dropWhile
*/
dropWhile<TValue>(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<TValue>;
/**
* @see _.dropWhile
*/
dropWhile<TWhere, TValue>(
predicate?: TWhere
): LoDashImplicitArrayWrapper<TValue>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.dropWhile
*/
dropWhile(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.dropWhile
*/
dropWhile(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.dropWhile
*/
dropWhile<TWhere>(
predicate?: TWhere
): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.dropWhile
*/
dropWhile<TValue>(
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<TValue>;
/**
* @see _.dropWhile
*/
dropWhile<TValue>(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<TValue>;
/**
* @see _.dropWhile
*/
dropWhile<TWhere, TValue>(
predicate?: TWhere
): LoDashExplicitArrayWrapper<TValue>;
}
//_.fill
interface LoDashStatic {
/**
* Fills elements of array with value from start up to, but not including, end.
*
* Note: This method mutates array.
*
* @param array The array to fill.
* @param value The value to fill array with.
* @param start The start position.
* @param end The end position.
* @return Returns array.
*/
fill<T>(
array: any[],
value: T,
start?: number,
end?: number
): T[];
/**
* @see _.fill
*/
fill<T>(
array: List<any>,
value: T,
start?: number,
end?: number
): List<T>;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.fill
*/
fill<T>(
value: T,
start?: number,
end?: number
): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.fill
*/
fill<T>(
value: T,
start?: number,
end?: number
): LoDashImplicitObjectWrapper<List<T>>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.fill
*/
fill<T>(
value: T,
start?: number,
end?: number
): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.fill
*/
fill<T>(
value: T,
start?: number,
end?: number
): LoDashExplicitObjectWrapper<List<T>>;
}
//_.findIndex
interface LoDashStatic {
/**
* This method is like _.find except that it returns the index of the first element predicate returns truthy
* for instead of the element itself.
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to search.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the index of the found element, else -1.
*/
findIndex<T>(
array: List<T>,
predicate?: ListIterator<T, boolean>,
thisArg?: any
): number;
/**
* @see _.findIndex
*/
findIndex<T>(
array: List<T>,
predicate?: string,
thisArg?: any
): number;
/**
* @see _.findIndex
*/
findIndex<W, T>(
array: List<T>,
predicate?: W
): number;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.findIndex
*/
findIndex(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): number;
/**
* @see _.findIndex
*/
findIndex(
predicate?: string,
thisArg?: any
): number;
/**
* @see _.findIndex
*/
findIndex<W>(
predicate?: W
): number;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.findIndex
*/
findIndex<TResult>(
predicate?: ListIterator<TResult, boolean>,
thisArg?: any
): number;
/**
* @see _.findIndex
*/
findIndex(
predicate?: string,
thisArg?: any
): number;
/**
* @see _.findIndex
*/
findIndex<W>(
predicate?: W
): number;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.findIndex
*/
findIndex(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.findIndex
*/
findIndex(
predicate?: string,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.findIndex
*/
findIndex<W>(
predicate?: W
): LoDashExplicitWrapper<number>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.findIndex
*/
findIndex<TResult>(
predicate?: ListIterator<TResult, boolean>,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.findIndex
*/
findIndex(
predicate?: string,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.findIndex
*/
findIndex<W>(
predicate?: W
): LoDashExplicitWrapper<number>;
}
//_.findLastIndex
interface LoDashStatic {
/**
* This method is like _.findIndex except that it iterates over elements of collection from right to left.
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to search.
* @param predicate The function invoked per iteration.
* @param thisArg The function invoked per iteration.
* @return Returns the index of the found element, else -1.
*/
findLastIndex<T>(
array: List<T>,
predicate?: ListIterator<T, boolean>,
thisArg?: any
): number;
/**
* @see _.findLastIndex
*/
findLastIndex<T>(
array: List<T>,
predicate?: string,
thisArg?: any
): number;
/**
* @see _.findLastIndex
*/
findLastIndex<W, T>(
array: List<T>,
predicate?: W
): number;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.findLastIndex
*/
findLastIndex(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): number;
/**
* @see _.findLastIndex
*/
findLastIndex(
predicate?: string,
thisArg?: any
): number;
/**
* @see _.findLastIndex
*/
findLastIndex<W>(
predicate?: W
): number;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.findLastIndex
*/
findLastIndex<TResult>(
predicate?: ListIterator<TResult, boolean>,
thisArg?: any
): number;
/**
* @see _.findLastIndex
*/
findLastIndex(
predicate?: string,
thisArg?: any
): number;
/**
* @see _.findLastIndex
*/
findLastIndex<W>(
predicate?: W
): number;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.findLastIndex
*/
findLastIndex(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.findLastIndex
*/
findLastIndex(
predicate?: string,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.findLastIndex
*/
findLastIndex<W>(
predicate?: W
): LoDashExplicitWrapper<number>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.findLastIndex
*/
findLastIndex<TResult>(
predicate?: ListIterator<TResult, boolean>,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.findLastIndex
*/
findLastIndex(
predicate?: string,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.findLastIndex
*/
findLastIndex<W>(
predicate?: W
): LoDashExplicitWrapper<number>;
}
//_.first
interface LoDashStatic {
/**
* Gets the first element of array.
*
* @alias _.head
*
* @param array The array to query.
* @return Returns the first element of array.
*/
first<T>(array: List<T>): T;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.first
*/
first(): T;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.first
*/
first<TResult>(): TResult;
}
interface MaybeNestedList<T> extends List<T|List<T>> { }
interface RecursiveArray<T> extends Array<T|RecursiveArray<T>> { }
interface ListOfRecursiveArraysOrValues<T> extends List<T|RecursiveArray<T>> { }
interface RecursiveList<T> extends List<T|RecursiveList<T>> { }
//_.flatten
interface LoDashStatic {
/**
* Flattens a nested array a single level.
*
* _.flatten(x) is equivalent to _.flatten(x, false);
*
* @param array The array to flatten.
* @return `array` flattened.
**/
flatten<T>(array: MaybeNestedList<T>): T[];
/**
* Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it is only
* flattened a single level.
*
* If you know whether or not this should be recursively at compile time, you typically want to use a
* version without a boolean parameter (i.e. `_.flatten(x)` or `_.flattenDeep(x)`).
*
* @param array The array to flatten.
* @param deep Specify a deep flatten.
* @return `array` flattened.
**/
flatten<T>(array: RecursiveList<T>, isDeep: boolean): List<T> | RecursiveList<T>;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.flatten
**/
flatten<T>(): LoDashImplicitArrayWrapper<any>;
/**
* @see _.flatten
**/
flatten<T>(isShallow: boolean): LoDashImplicitArrayWrapper<any>;
}
//_.flattenDeep
interface LoDashStatic {
/**
* Recursively flattens a nested array.
*
* @param array The array to recursively flatten.
* @return Returns the new flattened array.
*/
flattenDeep<T>(array: RecursiveArray<T>): T[];
/**
* @see _.flattenDeep
*/
flattenDeep<T>(array: ListOfRecursiveArraysOrValues<T>): T[];
/**
* @see _.flattenDeep
*/
flattenDeep<T>(array: RecursiveList<T>): any[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.flattenDeep
*/
flattenDeep<T>(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.flattenDeep
*/
flattenDeep<T>(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.flattenDeep
*/
flattenDeep<T>(): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.flattenDeep
*/
flattenDeep<T>(): LoDashExplicitArrayWrapper<T>;
}
//_.head
interface LoDashStatic {
/**
* @see _.first
*/
head<T>(array: List<T>): T;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.first
*/
head(): T;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.first
*/
head<TResult>(): TResult;
}
//_.indexOf
interface LoDashStatic {
/**
* Gets the index at which the first occurrence of value is found in array using SameValueZero for equality
* comparisons. If fromIndex is negative, it’s used as the offset from the end of array. If array is sorted
* providing true for fromIndex performs a faster binary search.
*
* @param array The array to search.
* @param value The value to search for.
* @param fromIndex The index to search from or true to perform a binary search on a sorted array.
* @return The index to search from or true to perform a binary search on a sorted array.
*/
indexOf<T>(
array: List<T>,
value: T,
fromIndex?: boolean|number
): number;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.indexOf
*/
indexOf(
value: T,
fromIndex?: boolean|number
): number;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.indexOf
*/
indexOf<TValue>(
value: TValue,
fromIndex?: boolean|number
): number;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.indexOf
*/
indexOf(
value: T,
fromIndex?: boolean|number
): LoDashExplicitWrapper<number>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.indexOf
*/
indexOf<TValue>(
value: TValue,
fromIndex?: boolean|number
): LoDashExplicitWrapper<number>;
}
//_.initial
interface LoDashStatic {
/**
* Gets all but the last element of array.
*
* @param array The array to query.
* @return Returns the slice of array.
*/
initial<T>(array: List<T>): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.initial
*/
initial(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.initial
*/
initial<T>(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.initial
*/
initial(): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.initial
*/
initial<T>(): LoDashExplicitArrayWrapper<T>;
}
//_.intersection
interface LoDashStatic {
/**
* Creates an array of unique values that are included in all of the provided arrays using SameValueZero for
* equality comparisons.
*
* @param arrays The arrays to inspect.
* @return Returns the new array of shared values.
*/
intersection<T>(...arrays: (T[]|List<T>)[]): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.intersection
*/
intersection<TResult>(...arrays: (TResult[]|List<TResult>)[]): LoDashImplicitArrayWrapper<TResult>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.intersection
*/
intersection<TResult>(...arrays: (TResult[]|List<TResult>)[]): LoDashImplicitArrayWrapper<TResult>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.intersection
*/
intersection<TResult>(...arrays: (TResult[]|List<TResult>)[]): LoDashExplicitArrayWrapper<TResult>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.intersection
*/
intersection<TResult>(...arrays: (TResult[]|List<TResult>)[]): LoDashExplicitArrayWrapper<TResult>;
}
//_.last
interface LoDashStatic {
/**
* Gets the last element of array.
*
* @param array The array to query.
* @return Returns the last element of array.
*/
last<T>(array: List<T>): T;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.last
*/
last(): T;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.last
*/
last<T>(): T;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.last
*/
last(): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.last
*/
last<T>(): LoDashExplicitObjectWrapper<T>;
}
//_.lastIndexOf
interface LoDashStatic {
/**
* This method is like _.indexOf except that it iterates over elements of array from right to left.
*
* @param array The array to search.
* @param value The value to search for.
* @param fromIndex The index to search from or true to perform a binary search on a sorted array.
* @return Returns the index of the matched value, else -1.
*/
lastIndexOf<T>(
array: List<T>,
value: T,
fromIndex?: boolean|number
): number;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.lastIndexOf
*/
lastIndexOf(
value: T,
fromIndex?: boolean|number
): number;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.lastIndexOf
*/
lastIndexOf<TResult>(
value: TResult,
fromIndex?: boolean|number
): number;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.lastIndexOf
*/
lastIndexOf(
value: T,
fromIndex?: boolean|number
): LoDashExplicitWrapper<number>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.lastIndexOf
*/
lastIndexOf<TResult>(
value: TResult,
fromIndex?: boolean|number
): LoDashExplicitWrapper<number>;
}
//_.object
interface LoDashStatic {
/**
* @see _.zipObject
*/
object<TValues, TResult extends {}>(
props: List<StringRepresentable>|List<List<any>>,
values?: List<TValues>
): TResult;
/**
* @see _.zipObject
*/
object<TResult extends {}>(
props: List<StringRepresentable>|List<List<any>>,
values?: List<any>
): TResult;
/**
* @see _.zipObject
*/
object(
props: List<StringRepresentable>|List<List<any>>,
values?: List<any>
): _.Dictionary<any>;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.zipObject
*/
object<TValues, TResult extends {}>(
values?: List<TValues>
): _.LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
object<TResult extends {}>(
values?: List<any>
): _.LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
object(
values?: List<any>
): _.LoDashImplicitObjectWrapper<_.Dictionary<any>>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.zipObject
*/
object<TValues, TResult extends {}>(
values?: List<TValues>
): _.LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
object<TResult extends {}>(
values?: List<any>
): _.LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
object(
values?: List<any>
): _.LoDashImplicitObjectWrapper<_.Dictionary<any>>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.zipObject
*/
object<TValues, TResult extends {}>(
values?: List<TValues>
): _.LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
object<TResult extends {}>(
values?: List<any>
): _.LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
object(
values?: List<any>
): _.LoDashExplicitObjectWrapper<_.Dictionary<any>>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.zipObject
*/
object<TValues, TResult extends {}>(
values?: List<TValues>
): _.LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
object<TResult extends {}>(
values?: List<any>
): _.LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
object(
values?: List<any>
): _.LoDashExplicitObjectWrapper<_.Dictionary<any>>;
}
//_.pull
interface LoDashStatic {
/**
* Removes all provided values from array using SameValueZero for equality comparisons.
*
* Note: Unlike _.without, this method mutates array.
*
* @param array The array to modify.
* @param values The values to remove.
* @return Returns array.
*/
pull<T>(
array: T[],
...values: T[]
): T[];
/**
* @see _.pull
*/
pull<T>(
array: List<T>,
...values: T[]
): List<T>;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.pull
*/
pull(...values: T[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.pull
*/
pull<TValue>(...values: TValue[]): LoDashImplicitObjectWrapper<List<TValue>>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.pull
*/
pull(...values: T[]): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.pull
*/
pull<TValue>(...values: TValue[]): LoDashExplicitObjectWrapper<List<TValue>>;
}
//_.pullAt
interface LoDashStatic {
/**
* Removes elements from array corresponding to the given indexes and returns an array of the removed elements.
* Indexes may be specified as an array of indexes or as individual arguments.
*
* Note: Unlike _.at, this method mutates array.
*
* @param array The array to modify.
* @param indexes The indexes of elements to remove, specified as individual indexes or arrays of indexes.
* @return Returns the new array of removed elements.
*/
pullAt<T>(
array: List<T>,
...indexes: (number|number[])[]
): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.pullAt
*/
pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.pullAt
*/
pullAt<T>(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.pullAt
*/
pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.pullAt
*/
pullAt<T>(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper<T>;
}
//_.remove
interface LoDashStatic {
/**
* Removes all elements from array that predicate returns truthy for and returns an array of the removed
* elements. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* Note: Unlike _.filter, this method mutates array.
*
* @param array The array to modify.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the new array of removed elements.
*/
remove<T>(
array: List<T>,
predicate?: ListIterator<T, boolean>,
thisArg?: any
): T[];
/**
* @see _.remove
*/
remove<T>(
array: List<T>,
predicate?: string,
thisArg?: any
): T[];
/**
* @see _.remove
*/
remove<W, T>(
array: List<T>,
predicate?: W
): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.remove
*/
remove(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.remove
*/
remove(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.remove
*/
remove<W>(
predicate?: W
): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.remove
*/
remove<TResult>(
predicate?: ListIterator<TResult, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<TResult>;
/**
* @see _.remove
*/
remove<TResult>(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<TResult>;
/**
* @see _.remove
*/
remove<W, TResult>(
predicate?: W
): LoDashImplicitArrayWrapper<TResult>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.remove
*/
remove(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.remove
*/
remove(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.remove
*/
remove<W>(
predicate?: W
): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.remove
*/
remove<TResult>(
predicate?: ListIterator<TResult, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<TResult>;
/**
* @see _.remove
*/
remove<TResult>(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<TResult>;
/**
* @see _.remove
*/
remove<W, TResult>(
predicate?: W
): LoDashExplicitArrayWrapper<TResult>;
}
//_.rest
interface LoDashStatic {
/**
* Gets all but the first element of array.
*
* @alias _.tail
*
* @param array The array to query.
* @return Returns the slice of array.
*/
rest<T>(array: List<T>): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.rest
*/
rest(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.rest
*/
rest<T>(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.rest
*/
rest(): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.rest
*/
rest<T>(): LoDashExplicitArrayWrapper<T>;
}
//_.slice
interface LoDashStatic {
/**
* Creates a slice of array from start up to, but not including, end.
*
* @param array The array to slice.
* @param start The start position.
* @param end The end position.
* @return Returns the slice of array.
*/
slice<T>(
array: T[],
start?: number,
end?: number
): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.slice
*/
slice(
start?: number,
end?: number
): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.slice
*/
slice(
start?: number,
end?: number
): LoDashExplicitArrayWrapper<T>;
}
//_.sortedIndex
interface LoDashStatic {
/**
* Uses a binary search to determine the lowest index at which value should be inserted into array in order to maintain its sort order. If an iteratee function is provided it’s invoked for value and each element of array to compute their sort ranking. The iteratee is bound to thisArg and invoked with one argument; (value).
*
* If a property name is provided for iteratee the created _.property style callback returns the property value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for elements that have a matching property value, else false.
*
* If an object is provided for iteratee the created _.matches style callback returns true for elements that have the properties of the given object, else false.
*
* @param array The sorted array to inspect.
* @param value The value to evaluate.
* @param iteratee The function invoked per iteration.
* @return The this binding of iteratee.
*/
sortedIndex<T, TSort>(
array: List<T>,
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
array: List<T>,
value: T,
iteratee?: (x: T) => any,
thisArg?: any
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
array: List<T>,
value: T,
iteratee: string
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<W, T>(
array: List<T>,
value: T,
iteratee: W
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
array: List<T>,
value: T,
iteratee: Object
): number;
}
interface LoDashImplicitWrapper<T> {
/**
* @see _.sortedIndex
*/
sortedIndex<TSort>(
value: string,
iteratee?: (x: string) => TSort,
thisArg?: any
): number;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.sortedIndex
*/
sortedIndex<TSort>(
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): number;
/**
* @see _.sortedIndex
*/
sortedIndex(
value: T,
iteratee: string
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<W>(
value: T,
iteratee: W
): number;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.sortedIndex
*/
sortedIndex<T, TSort>(
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
value: T,
iteratee?: (x: T) => any,
thisArg?: any
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
value: T,
iteratee: string
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<W, T>(
value: T,
iteratee: W
): number;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
value: T,
iteratee: Object
): number;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.sortedIndex
*/
sortedIndex<TSort>(
value: string,
iteratee?: (x: string) => TSort,
thisArg?: any
): LoDashExplicitWrapper<number>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.sortedIndex
*/
sortedIndex<TSort>(
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedIndex
*/
sortedIndex(
value: T,
iteratee: string
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedIndex
*/
sortedIndex<W>(
value: T,
iteratee: W
): LoDashExplicitWrapper<number>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.sortedIndex
*/
sortedIndex<T, TSort>(
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
value: T,
iteratee?: (x: T) => any,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
value: T,
iteratee: string
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedIndex
*/
sortedIndex<W, T>(
value: T,
iteratee: W
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedIndex
*/
sortedIndex<T>(
value: T,
iteratee: Object
): LoDashExplicitWrapper<number>;
}
//_.sortedLastIndex
interface LoDashStatic {
/**
* This method is like _.sortedIndex except that it returns the highest index at which value should be
* inserted into array in order to maintain its sort order.
*
* @param array The sorted array to inspect.
* @param value The value to evaluate.
* @param iteratee The function invoked per iteration.
* @param thisArg The this binding of iteratee.
* @return Returns the index at which value should be inserted into array.
*/
sortedLastIndex<T, TSort>(
array: List<T>,
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
array: List<T>,
value: T,
iteratee?: (x: T) => any,
thisArg?: any
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
array: List<T>,
value: T,
iteratee: string
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<W, T>(
array: List<T>,
value: T,
iteratee: W
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
array: List<T>,
value: T,
iteratee: Object
): number;
}
interface LoDashImplicitWrapper<T> {
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<TSort>(
value: string,
iteratee?: (x: string) => TSort,
thisArg?: any
): number;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<TSort>(
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex(
value: T,
iteratee: string
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<W>(
value: T,
iteratee: W
): number;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T, TSort>(
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
value: T,
iteratee?: (x: T) => any,
thisArg?: any
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
value: T,
iteratee: string
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<W, T>(
value: T,
iteratee: W
): number;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
value: T,
iteratee: Object
): number;
}
interface LoDashExplicitWrapper<T> {
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<TSort>(
value: string,
iteratee?: (x: string) => TSort,
thisArg?: any
): LoDashExplicitWrapper<number>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<TSort>(
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex(
value: T,
iteratee: string
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<W>(
value: T,
iteratee: W
): LoDashExplicitWrapper<number>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T, TSort>(
value: T,
iteratee?: (x: T) => TSort,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
value: T,
iteratee?: (x: T) => any,
thisArg?: any
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
value: T,
iteratee: string
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<W, T>(
value: T,
iteratee: W
): LoDashExplicitWrapper<number>;
/**
* @see _.sortedLastIndex
*/
sortedLastIndex<T>(
value: T,
iteratee: Object
): LoDashExplicitWrapper<number>;
}
//_.tail
interface LoDashStatic {
/**
* @see _.rest
*/
tail<T>(array: List<T>): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.rest
*/
tail(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.rest
*/
tail<T>(): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.rest
*/
tail(): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.rest
*/
tail<T>(): LoDashExplicitArrayWrapper<T>;
}
//_.take
interface LoDashStatic {
/**
* Creates a slice of array with n elements taken from the beginning.
*
* @param array The array to query.
* @param n The number of elements to take.
* @return Returns the slice of array.
*/
take<T>(
array: List<T>,
n?: number
): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.take
*/
take(n?: number): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.take
*/
take<TResult>(n?: number): LoDashImplicitArrayWrapper<TResult>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.take
*/
take(n?: number): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.take
*/
take<TResult>(n?: number): LoDashExplicitArrayWrapper<TResult>;
}
//_.takeRight
interface LoDashStatic {
/**
* Creates a slice of array with n elements taken from the end.
*
* @param array The array to query.
* @param n The number of elements to take.
* @return Returns the slice of array.
*/
takeRight<T>(
array: List<T>,
n?: number
): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.takeRight
*/
takeRight(n?: number): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.takeRight
*/
takeRight<TResult>(n?: number): LoDashImplicitArrayWrapper<TResult>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.takeRight
*/
takeRight(n?: number): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.takeRight
*/
takeRight<TResult>(n?: number): LoDashExplicitArrayWrapper<TResult>;
}
//_.takeRightWhile
interface LoDashStatic {
/**
* Creates a slice of array with elements taken from the end. Elements are taken until predicate returns
* falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to query.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the slice of array.
*/
takeRightWhile<TValue>(
array: List<TValue>,
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): TValue[];
/**
* @see _.takeRightWhile
*/
takeRightWhile<TValue>(
array: List<TValue>,
predicate?: string,
thisArg?: any
): TValue[];
/**
* @see _.takeRightWhile
*/
takeRightWhile<TWhere, TValue>(
array: List<TValue>,
predicate?: TWhere
): TValue[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.takeRightWhile
*/
takeRightWhile(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.takeRightWhile
*/
takeRightWhile(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.takeRightWhile
*/
takeRightWhile<TWhere>(
predicate?: TWhere
): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.takeRightWhile
*/
takeRightWhile<TValue>(
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<TValue>;
/**
* @see _.takeRightWhile
*/
takeRightWhile<TValue>(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<TValue>;
/**
* @see _.takeRightWhile
*/
takeRightWhile<TWhere, TValue>(
predicate?: TWhere
): LoDashImplicitArrayWrapper<TValue>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.takeRightWhile
*/
takeRightWhile(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.takeRightWhile
*/
takeRightWhile(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.takeRightWhile
*/
takeRightWhile<TWhere>(
predicate?: TWhere
): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.takeRightWhile
*/
takeRightWhile<TValue>(
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<TValue>;
/**
* @see _.takeRightWhile
*/
takeRightWhile<TValue>(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<TValue>;
/**
* @see _.takeRightWhile
*/
takeRightWhile<TWhere, TValue>(
predicate?: TWhere
): LoDashExplicitArrayWrapper<TValue>;
}
//_.takeWhile
interface LoDashStatic {
/**
* Creates a slice of array with elements taken from the beginning. Elements are taken until predicate returns
* falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array).
*
* If a property name is provided for predicate the created _.property style callback returns the property
* value of the given element.
*
* If a value is also provided for thisArg the created _.matchesProperty style callback returns true for
* elements that have a matching property value, else false.
*
* If an object is provided for predicate the created _.matches style callback returns true for elements that
* have the properties of the given object, else false.
*
* @param array The array to query.
* @param predicate The function invoked per iteration.
* @param thisArg The this binding of predicate.
* @return Returns the slice of array.
*/
takeWhile<TValue>(
array: List<TValue>,
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): TValue[];
/**
* @see _.takeWhile
*/
takeWhile<TValue>(
array: List<TValue>,
predicate?: string,
thisArg?: any
): TValue[];
/**
* @see _.takeWhile
*/
takeWhile<TWhere, TValue>(
array: List<TValue>,
predicate?: TWhere
): TValue[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.takeWhile
*/
takeWhile(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.takeWhile
*/
takeWhile(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<T>;
/**
* @see _.takeWhile
*/
takeWhile<TWhere>(
predicate?: TWhere
): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.takeWhile
*/
takeWhile<TValue>(
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): LoDashImplicitArrayWrapper<TValue>;
/**
* @see _.takeWhile
*/
takeWhile<TValue>(
predicate?: string,
thisArg?: any
): LoDashImplicitArrayWrapper<TValue>;
/**
* @see _.takeWhile
*/
takeWhile<TWhere, TValue>(
predicate?: TWhere
): LoDashImplicitArrayWrapper<TValue>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.takeWhile
*/
takeWhile(
predicate?: ListIterator<T, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.takeWhile
*/
takeWhile(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<T>;
/**
* @see _.takeWhile
*/
takeWhile<TWhere>(
predicate?: TWhere
): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.takeWhile
*/
takeWhile<TValue>(
predicate?: ListIterator<TValue, boolean>,
thisArg?: any
): LoDashExplicitArrayWrapper<TValue>;
/**
* @see _.takeWhile
*/
takeWhile<TValue>(
predicate?: string,
thisArg?: any
): LoDashExplicitArrayWrapper<TValue>;
/**
* @see _.takeWhile
*/
takeWhile<TWhere, TValue>(
predicate?: TWhere
): LoDashExplicitArrayWrapper<TValue>;
}
//_.union
interface LoDashStatic {
/**
* Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for
* equality comparisons.
*
* @param arrays The arrays to inspect.
* @return Returns the new array of combined values.
*/
union<T>(...arrays: List<T>[]): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.union
*/
union(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
/**
* @see _.union
*/
union<T>(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.union
*/
union<T>(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.union
*/
union(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
/**
* @see _.union
*/
union<T>(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.union
*/
union<T>(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
}
//_.uniq
interface LoDashStatic {
/**
* Creates a duplicate-value-free version of an array using strict equality for comparisons,
* i.e. ===. If the array is sorted, providing true for isSorted will use a faster algorithm.
* If a callback is provided each element of array is passed through the callback before
* uniqueness is computed. The callback is bound to thisArg and invoked with three arguments;
* (value, index, array).
*
* If a property name is provided for callback the created "_.pluck" style callback will
* return the property value of the given element.
*
* If an object is provided for callback the created "_.where" style callback will return
* true for elements that have the properties of the given object, else false.
* @param array Array to remove duplicates from.
* @param isSorted True if `array` is already sorted, optiona, 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: Array<T>, isSorted?: boolean): T[];
/**
* @see _.uniq
**/
uniq<T, TSort>(array: List<T>, isSorted?: boolean): T[];
/**
* @see _.uniq
**/
uniq<T, TSort>(
array: Array<T>,
isSorted: boolean,
callback: ListIterator<T, TSort>,
thisArg?: any): T[];
/**
* @see _.uniq
**/
uniq<T, TSort>(
array: List<T>,
isSorted: boolean,
callback: ListIterator<T, TSort>,
thisArg?: any): T[];
/**
* @see _.uniq
**/
uniq<T, TSort>(
array: Array<T>,
callback: ListIterator<T, TSort>,
thisArg?: any): T[];
/**
* @see _.uniq
**/
uniq<T, TSort>(
array: List<T>,
callback: ListIterator<T, TSort>,
thisArg?: any): T[];
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
uniq<T>(
array: Array<T>,
isSorted: boolean,
pluckValue: string): T[];
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
uniq<T>(
array: List<T>,
isSorted: boolean,
pluckValue: string): T[];
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
uniq<T>(
array: Array<T>,
pluckValue: string): T[];
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
uniq<T>(
array: List<T>,
pluckValue: string): T[];
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
uniq<W, T>(
array: Array<T>,
isSorted: boolean,
whereValue: W): T[];
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
uniq<W, T>(
array: List<T>,
isSorted: boolean,
whereValue: W): T[];
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
uniq<W, T>(
array: Array<T>,
whereValue: W): T[];
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
uniq<W, T>(
array: List<T>,
whereValue: W): T[];
/**
* @see _.uniq
**/
unique<T>(array: Array<T>, isSorted?: boolean): T[];
/**
* @see _.uniq
**/
unique<T>(array: List<T>, isSorted?: boolean): T[];
/**
* @see _.uniq
**/
unique<T, TSort>(
array: Array<T>,
callback: ListIterator<T, TSort>,
thisArg?: any): T[];
/**
* @see _.uniq
**/
unique<T, TSort>(
array: List<T>,
callback: ListIterator<T, TSort>,
thisArg?: any): T[];
/**
* @see _.uniq
**/
unique<T, TSort>(
array: Array<T>,
isSorted: boolean,
callback: ListIterator<T, TSort>,
thisArg?: any): T[];
/**
* @see _.uniq
**/
unique<T, TSort>(
array: List<T>,
isSorted: boolean,
callback: ListIterator<T, TSort>,
thisArg?: any): T[];
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
unique<T>(
array: Array<T>,
isSorted: boolean,
pluckValue: string): T[];
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
unique<T>(
array: List<T>,
isSorted: boolean,
pluckValue: string): T[];
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
unique<T>(
array: Array<T>,
pluckValue: string): T[];
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
unique<T>(
array: List<T>,
pluckValue: string): T[];
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
unique<W, T>(
array: Array<T>,
whereValue?: W): T[];
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
unique<W, T>(
array: List<T>,
whereValue?: W): T[];
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
unique<W, T>(
array: Array<T>,
isSorted: boolean,
whereValue?: W): T[];
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
unique<W, T>(
array: List<T>,
isSorted: boolean,
whereValue?: W): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.uniq
**/
uniq<TSort>(isSorted?: boolean): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
**/
uniq<TSort>(
isSorted: boolean,
callback: ListIterator<T, TSort>,
thisArg?: any): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
**/
uniq<TSort>(
callback: ListIterator<T, TSort>,
thisArg?: any): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
uniq(
isSorted: boolean,
pluckValue: string): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
uniq(pluckValue: string): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
uniq<W>(
isSorted: boolean,
whereValue: W): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
uniq<W>(
whereValue: W): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
**/
unique<TSort>(isSorted?: boolean): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
**/
unique<TSort>(
isSorted: boolean,
callback: ListIterator<T, TSort>,
thisArg?: any): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
**/
unique<TSort>(
callback: ListIterator<T, TSort>,
thisArg?: any): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
unique(
isSorted: boolean,
pluckValue: string): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
* @param pluckValue _.pluck style callback
**/
unique(pluckValue: string): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
unique<W>(
isSorted: boolean,
whereValue: W): LoDashImplicitArrayWrapper<T>;
/**
* @see _.uniq
* @param whereValue _.where style callback
**/
unique<W>(
whereValue: W): LoDashImplicitArrayWrapper<T>;
}
//_.unzip
interface LoDashStatic {
/**
* This method is like _.zip except that it accepts an array of grouped elements and creates an array
* regrouping the elements to their pre-zip configuration.
*
* @param array The array of grouped elements to process.
* @return Returns the new array of regrouped elements.
*/
unzip<T>(array: List<List<T>>): T[][];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.unzip
*/
unzip<T>(): LoDashImplicitArrayWrapper<T[]>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.unzip
*/
unzip<T>(): LoDashImplicitArrayWrapper<T[]>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.unzip
*/
unzip<T>(): LoDashExplicitArrayWrapper<T[]>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.unzip
*/
unzip<T>(): LoDashExplicitArrayWrapper<T[]>;
}
//_.unzipWith
interface LoDashStatic {
/**
* This method is like _.unzip except that it accepts an iteratee to specify how regrouped values should be
* combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index,
* group).
*
* @param array The array of grouped elements to process.
* @param iteratee The function to combine regrouped values.
* @param thisArg The this binding of iteratee.
* @return Returns the new array of regrouped elements.
*/
unzipWith<TArray, TResult>(
array: List<List<TArray>>,
iteratee?: MemoIterator<TArray, TResult>,
thisArg?: any
): TResult[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.unzipWith
*/
unzipWith<TArr, TResult>(
iteratee?: MemoIterator<TArr, TResult>,
thisArg?: any
): LoDashImplicitArrayWrapper<TResult>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.unzipWith
*/
unzipWith<TArr, TResult>(
iteratee?: MemoIterator<TArr, TResult>,
thisArg?: any
): LoDashImplicitArrayWrapper<TResult>;
}
//_.without
interface LoDashStatic {
/**
* Creates an array excluding all provided values using SameValueZero for equality comparisons.
*
* @param array The array to filter.
* @param values The values to exclude.
* @return Returns the new array of filtered values.
*/
without<T>(
array: List<T>,
...values: T[]
): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.without
*/
without(...values: T[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.without
*/
without<T>(...values: T[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.without
*/
without(...values: T[]): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.without
*/
without<T>(...values: T[]): LoDashExplicitArrayWrapper<T>;
}
//_.xor
interface LoDashStatic {
/**
* Creates an array of unique values that is the symmetric difference of the provided arrays.
*
* @param arrays The arrays to inspect.
* @return Returns the new array of values.
*/
xor<T>(...arrays: List<T>[]): T[];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.xor
*/
xor(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.xor
*/
xor<T>(...arrays: List<T>[]): LoDashImplicitArrayWrapper<T>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.xor
*/
xor(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.xor
*/
xor<T>(...arrays: List<T>[]): LoDashExplicitArrayWrapper<T>;
}
//_.zip
interface LoDashStatic {
/**
* Creates an array of grouped elements, the first of which contains the first elements of the given arrays,
* the second of which contains the second elements of the given arrays, and so on.
*
* @param arrays The arrays to process.
* @return Returns the new array of grouped elements.
*/
zip<T>(...arrays: List<T>[]): T[][];
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.zip
*/
zip<T>(...arrays: List<T>[]): _.LoDashImplicitArrayWrapper<T[]>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.zip
*/
zip<T>(...arrays: List<T>[]): _.LoDashImplicitArrayWrapper<T[]>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.zip
*/
zip<T>(...arrays: List<T>[]): _.LoDashExplicitArrayWrapper<T[]>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.zip
*/
zip<T>(...arrays: List<T>[]): _.LoDashExplicitArrayWrapper<T[]>;
}
//_.zipObject
interface LoDashStatic {
/**
* The inverse of _.pairs; this method returns an object composed from arrays of property names and values.
* Provide either a single two dimensional array, e.g. [[key1, value1], [key2, value2]] or two arrays, one of
* property names and one of corresponding values.
*
* @alias _.object
*
* @param props The property names.
* @param values The property values.
* @return Returns the new object.
*/
zipObject<TValues, TResult extends {}>(
props: List<StringRepresentable>|List<List<any>>,
values?: List<TValues>
): TResult;
/**
* @see _.zipObject
*/
zipObject<TResult extends {}>(
props: List<StringRepresentable>|List<List<any>>,
values?: List<any>
): TResult;
/**
* @see _.zipObject
*/
zipObject(
props: List<StringRepresentable>|List<List<any>>,
values?: List<any>
): _.Dictionary<any>;
}
interface LoDashImplicitArrayWrapper<T> {
/**
* @see _.zipObject
*/
zipObject<TValues, TResult extends {}>(
values?: List<TValues>
): _.LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
zipObject<TResult extends {}>(
values?: List<any>
): _.LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
zipObject(
values?: List<any>
): _.LoDashImplicitObjectWrapper<_.Dictionary<any>>;
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.zipObject
*/
zipObject<TValues, TResult extends {}>(
values?: List<TValues>
): _.LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
zipObject<TResult extends {}>(
values?: List<any>
): _.LoDashImplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
zipObject(
values?: List<any>
): _.LoDashImplicitObjectWrapper<_.Dictionary<any>>;
}
interface LoDashExplicitArrayWrapper<T> {
/**
* @see _.zipObject
*/
zipObject<TValues, TResult extends {}>(
values?: List<TValues>
): _.LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
zipObject<TResult extends {}>(
values?: List<any>
): _.LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
zipObject(
values?: List<any>
): _.LoDashExplicitObjectWrapper<_.Dictionary<any>>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.zipObject
*/
zipObject<TValues, TResult extends {}>(
values?: List<TValues>
): _.LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
zipObject<TResult extends {}>(
values?: List<any>
): _.LoDashExplicitObjectWrapper<TResult>;
/**
* @see _.zipObject
*/
zipObject(
values?: List<any>
): _.LoDashExplicitObjectWrapper<_.Dictionary<any>>;
}
//_.zipWith
interface LoDashStatic {
/**
* This method is like _.zip except that it accepts an iteratee to specify how grouped values should be
* combined. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, value, index,
* group).
* @param {...Array} [arrays] The arrays to process.
* @param {Function} [iteratee] The function to combine grouped values.
* @param {*} [thisArg] The `this` binding of `iteratee`.
* @return Returns the new array of grouped elements.
*/
zipWith<TResult>(...args: any[]): TResult[];