diff --git a/typings/DefinitelyTyped/lodash/lodash.d.ts b/typings/DefinitelyTyped/lodash/lodash.d.ts index 0a9fb3d..4f2ffdb 100644 --- a/typings/DefinitelyTyped/lodash/lodash.d.ts +++ b/typings/DefinitelyTyped/lodash/lodash.d.ts @@ -1,8 +1,241 @@ // Type definitions for Lo-Dash // Project: http://lodash.com/ -// Definitions by: Brian Zengel +// Definitions by: Brian Zengel , Ilya Mochalov // Definitions: https://github.com/borisyankov/DefinitelyTyped + +/** +### 4.0.0 Changelog (https://github.com/lodash/lodash/wiki/Changelog) + +#### TODO: +removed: +- [x] Removed _.support +- [x] Removed _.findWhere in favor of _.find with iteratee shorthand +- [x] Removed _.where in favor of _.filter with iteratee shorthand +- [x] Removed _.pluck in favor of _.map with iteratee shorthand + +renamed: +- [x] Renamed _.first to _.head +- [x] Renamed _.indexBy to _.keyBy +- [x] Renamed _.invoke to _.invokeMap +- [x] Renamed _.overArgs to _.overArgs +- [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd +- [x] Renamed _.pairs to _.toPairs +- [x] Renamed _.rest to _.tail +- [x] Renamed _.restParam to _.rest +- [x] Renamed _.sortByOrder to _.orderBy +- [x] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd +- [x] Renamed _.trunc to _.truncate + +split: +- [x] Split _.indexOf & _.lastIndexOf into _.sortedIndexOf & _.sortedLastIndexOf +- [x] Split _.max & _.min into _.maxBy & _.minBy +- [x] Split _.omit & _.pick into _.omitBy & _.pickBy +- [x] Split _.sample into _.sampleSize +- [x] Split _.sortedIndex into _.sortedIndexBy +- [x] Split _.sortedLastIndex into _.sortedLastIndexBy +- [x] Split _.uniq into _.sortedUniq, _.sortedUniqBy, & _.uniqBy + +changes: +- [x] Absorbed _.sortByAll into _.sortBy +- [x] Changed the category of _.at to “Object” +- [x] Changed the category of _.bindAll to “Utility” +- [x] Made _.capitalize uppercase the first character & lowercase the rest +- [x] Made _.functions return only own method names + + +added 23 array methods: +- [x] _.concat +- [x] _.differenceBy +- [x] _.differenceWith +- [x] _.flatMap +- [x] _.fromPairs +- [x] _.intersectionBy +- [x] _.intersectionWith +- [x] _.join +- [x] _.pullAll +- [x] _.pullAllBy +- [x] _.reverse +- [x] _.sortedIndexBy +- [x] _.sortedIndexOf +- [x] _.sortedLastIndexBy +- [x] _.sortedLastIndexOf +- [x] _.sortedUniq +- [x] _.sortedUniqBy +- [x] _.unionBy +- [x] _.unionWith +- [x] _.uniqBy +- [x] _.uniqWith +- [x] _.xorBy +- [x] _.xorWith + +added 18 lang methods: +- [x] _.cloneDeepWith +- [x] _.cloneWith +- [x] _.eq +- [x] _.isArrayLike +- [x] _.isArrayLikeObject +- [x] _.isEqualWith +- [x] _.isInteger +- [x] _.isLength +- [x] _.isMatchWith +- [x] _.isNil +- [x] _.isObjectLike +- [x] _.isSafeInteger +- [x] _.isSymbol +- [x] _.toInteger +- [x] _.toLength +- [x] _.toNumber +- [x] _.toSafeInteger +- [x] _.toString + +added 13 object methods: +- [x] _.assignIn +- [x] _.assignInWith +- [x] _.assignWith +- [x] _.functionsIn +- [x] _.hasIn +- [x] _.mergeWith +- [x] _.omitBy +- [x] _.pickBy + + +added 8 string methods: +- [x] _.lowerCase +- [x] _.lowerFirst +- [x] _.upperCase +- [x] _.upperFirst +- [x] _.toLower +- [x] _.toUpper + +added 8 utility methods: +- [x] _.toPath + +added 4 math methods: +- [x] _.maxBy +- [x] _.mean +- [x] _.minBy +- [x] _.sumBy + +added 2 function methods: +- [x] _.flip +- [x] _.unary + +added 2 number methods: +- [x] _.clamp +- [x] _.subtract + +added collection method: +- [x] _.sampleSize + +Added 3 aliases + +- [x] _.first as an alias of _.head + +Removed 17 aliases +- [x] Removed aliase _.all +- [x] Removed aliase _.any +- [x] Removed aliase _.backflow +- [x] Removed aliase _.callback +- [x] Removed aliase _.collect +- [x] Removed aliase _.compose +- [x] Removed aliase _.contains +- [x] Removed aliase _.detect +- [x] Removed aliase _.foldl +- [x] Removed aliase _.foldr +- [x] Removed aliase _.include +- [x] Removed aliase _.inject +- [x] Removed aliase _.methods +- [x] Removed aliase _.object +- [x] Removed aliase _.run +- [x] Removed aliase _.select +- [x] Removed aliase _.unique + +Other changes +- [x] Added support for array buffers to _.isEqual +- [x] Added support for converting iterators to _.toArray +- [x] Added support for deep paths to _.zipObject +- [x] Changed UMD to export to window or self when available regardless of other exports +- [x] Ensured debounce cancel clears args & thisArg references +- [x] Ensured _.add, _.subtract, & _.sum don’t skip NaN values +- [x] Ensured _.clone treats generators like functions +- [x] Ensured _.clone produces clones with the source’s [[Prototype]] +- [x] Ensured _.defaults assigns properties that shadow Object.prototype +- [x] Ensured _.defaultsDeep doesn’t merge a string into an array +- [x] Ensured _.defaultsDeep & _.merge don’t modify sources +- [x] Ensured _.defaultsDeep works with circular references +- [x] Ensured _.keys skips “length” on strict mode arguments objects in Safari 9 +- [x] Ensured _.merge doesn’t convert strings to arrays +- [x] Ensured _.merge merges plain-objects onto non plain-objects +- [x] Ensured _#plant resets iterator data of cloned sequences +- [x] Ensured _.random swaps min & max if min is greater than max +- [x] Ensured _.range preserves the sign of start of -0 +- [x] Ensured _.reduce & _.reduceRight use getIteratee in their array branch +- [x] Fixed rounding issue with the precision param of _.floor + +** LATER ** +Misc: +- [ ] Made _.forEach, _.forIn, _.forOwn, & _.times implicitly end a chain sequence +- [ ] Removed thisArg params from most methods +- [ ] Made “By” methods provide a single param to iteratees +- [ ] Made _.words chainable by default +- [ ] Removed isDeep params from _.clone & _.flatten +- [ ] Removed _.bindAll support for binding all methods when no names are provided +- [ ] Removed func-first param signature from _.before & _.after +- [ ] _.extend as an alias of _.assignIn +- [ ] _.extendWith as an alias of _.assignInWith +- [ ] Added clear method to _.memoize.Cache +- [ ] Added flush method to debounced & throttled functions +- [ ] Added support for ES6 maps, sets, & symbols to _.clone, _.isEqual, & _.toArray +- [ ] Enabled _.flow & _.flowRight to accept an array of functions +- [ ] Ensured “Collection” methods treat functions as objects +- [ ] Ensured _.assign, _.defaults, & _.merge coerce object values to objects +- [ ] Ensured _.bindKey bound functions call object[key] when called with the new operator +- [ ] Ensured _.isFunction returns true for generator functions +- [ ] Ensured _.merge assigns typed arrays directly +- [ ] Made _(...) an iterator & iterable +- [ ] Made _.drop, _.take, & right forms coerce n of undefined to 0 + +Methods: +- [ ] _.concat +- [ ] _.differenceBy +- [ ] _.differenceWith +- [ ] _.flatMap +- [ ] _.fromPairs +- [ ] _.intersectionBy +- [ ] _.intersectionWith +- [ ] _.join +- [ ] _.pullAll +- [ ] _.pullAllBy +- [ ] _.reverse +- [ ] _.sortedLastIndexOf +- [ ] _.unionBy +- [ ] _.unionWith +- [ ] _.uniqWith +- [ ] _.xorBy +- [ ] _.xorWith +- [ ] _.toString + +- [ ] _.invoke +- [ ] _.setWith +- [ ] _.toPairs +- [ ] _.toPairsIn +- [ ] _.unset + +- [ ] _.replace +- [ ] _.split + +- [ ] _.cond +- [ ] _.conforms +- [ ] _.nthArg +- [ ] _.over +- [ ] _.overEvery +- [ ] _.overSome +- [ ] _.rangeRight + +- [ ] _.next +*/ + declare var _: _.LoDashStatic; declare module _ { @@ -13,37 +246,38 @@ declare module _ { * 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 + * 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, 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, shuffle, slice, sort, sortBy, splice, tap, throttle, times, - * toArray, transform, union, uniq, unshift, unzip, values, where, without, wrap, and zip + * 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, + * keyBy, 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, unset, 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, + * 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 + * 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): LoDashWrapper; - (value: string): LoDashWrapper; - (value: boolean): LoDashWrapper; - (value: Array): LoDashArrayWrapper; - (value: T): LoDashObjectWrapper; - (value: any): LoDashWrapper; + (value: number): LoDashImplicitWrapper; + (value: string): LoDashImplicitStringWrapper; + (value: boolean): LoDashImplicitWrapper; + (value: Array): LoDashImplicitNumberArrayWrapper; + (value: Array): LoDashImplicitArrayWrapper; + (value: T): LoDashImplicitObjectWrapper; + (value: any): LoDashImplicitWrapper; /** * The semantic version number. @@ -51,19 +285,14 @@ declare module _ { 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 + * 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 + * 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 { @@ -94,6324 +323,17761 @@ declare module _ { } /** - * An object used to flag environments features. - **/ - interface Support { + * Creates a cache object to store key/value pairs. + */ + interface MapCache { /** - * Detect if an arguments object’s [[Class]] is resolvable (all but Firefox < 4, IE < 9). - **/ - argsClass: boolean; + * 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; /** - * Detect if arguments objects are Object objects (all but Narwhal and Opera < 10.5). - **/ - argsObject: 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; /** - * Detect if name or message properties of Error.prototype are enumerable by default. - * (IE < 9, Safari < 5.1) - **/ - enumErrorProps: boolean; + * 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; /** - * Detect if Function#bind exists and is inferred to be fast (all but V8). - **/ - fastBind: 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; + } - /** - * Detect if functions can be decompiled by Function#toString (all but PS3 and older Opera - * mobile browsers & avoided in Windows 8 apps). - **/ - funcDecomp: boolean; + interface LoDashWrapperBase { } - /** - * Detect if Function#name is supported (all but IE). - **/ - funcNames: boolean; + interface LoDashImplicitWrapperBase extends LoDashWrapperBase { } - /** - * Detect if arguments object indexes are non-enumerable (Firefox < 4, IE < 9, PhantomJS, - * Safari < 5.1). - **/ - nonEnumArgs: boolean; + interface LoDashExplicitWrapperBase extends LoDashWrapperBase { } - /** - * 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; + interface LoDashImplicitWrapper extends LoDashImplicitWrapperBase> { } - /** - * Detect if own properties are iterated after inherited properties (all but IE < 9). - **/ - ownLast: boolean; + interface LoDashExplicitWrapper extends LoDashExplicitWrapperBase> { } - /** - * 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; + interface LoDashImplicitStringWrapper extends LoDashImplicitWrapper { } - /** - * 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 LoDashExplicitStringWrapper extends LoDashExplicitWrapper { } - interface LoDashWrapperBase { - /** - * Produces the toString result of the wrapped value. - * @return Returns the string result. - **/ - toString(): string; + interface LoDashImplicitObjectWrapper extends LoDashImplicitWrapperBase> { } - /** - * Extracts the wrapped value. - * @return The wrapped value. - **/ - valueOf(): T; + interface LoDashExplicitObjectWrapper extends LoDashExplicitWrapperBase> { } - /** - * @see valueOf - **/ - value(): T; + interface LoDashImplicitArrayWrapper extends LoDashImplicitWrapperBase> { + pop(): T; + push(...items: T[]): LoDashImplicitArrayWrapper; + shift(): T; + sort(compareFn?: (a: T, b: T) => number): LoDashImplicitArrayWrapper; + splice(start: number): LoDashImplicitArrayWrapper; + splice(start: number, deleteCount: number, ...items: any[]): LoDashImplicitArrayWrapper; + unshift(...items: T[]): LoDashImplicitArrayWrapper; } - interface LoDashWrapper extends LoDashWrapperBase> { } + interface LoDashExplicitArrayWrapper extends LoDashExplicitWrapperBase> { } - interface LoDashObjectWrapper extends LoDashWrapperBase> { } + interface LoDashImplicitNumberArrayWrapper extends LoDashImplicitArrayWrapper { } - interface LoDashArrayWrapper extends LoDashWrapperBase> { - concat(...items: T[]): LoDashArrayWrapper; - join(seperator?: string): LoDashWrapper; - pop(): LoDashWrapper; - push(...items: T[]): void; - reverse(): LoDashArrayWrapper; - shift(): LoDashWrapper; - slice(start: number, end?: number): LoDashArrayWrapper; - sort(compareFn?: (a: T, b: T) => number): LoDashArrayWrapper; - splice(start: number): LoDashArrayWrapper; - splice(start: number, deleteCount: number, ...items: any[]): LoDashArrayWrapper; - unshift(...items: any[]): LoDashWrapper; - } + interface LoDashExplicitNumberArrayWrapper extends LoDashExplicitArrayWrapper { } - //_.chain + /********* + * Array * + *********/ + + //_.chunk interface LoDashStatic { /** - * Creates a lodash object that wraps the given value with explicit method chaining enabled. - * @param value The value to wrap. - * @return The wrapper object. - **/ - chain(value: number): LoDashWrapper; - chain(value: string): LoDashWrapper; - chain(value: boolean): LoDashWrapper; - chain(value: Array): LoDashArrayWrapper; - chain(value: T): LoDashObjectWrapper; - chain(value: any): LoDashWrapper; + * 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( + array: List, + size?: number + ): T[][]; } - interface LoDashWrapperBase { + interface LoDashImplicitArrayWrapper { /** - * Enables explicit method chaining on the wrapper object. - * @see _.chain - * @return The wrapper object. - **/ - chain(): TWrapper; + * @see _.chunk + */ + chunk(size?: number): LoDashImplicitArrayWrapper; } - //_.tap - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Invokes interceptor with the value as the first argument and then returns value. The - * purpose of this method is to "tap into" a method chain in order to perform operations on - * intermediate results within the chain. - * @param value The value to provide to interceptor - * @param interceptor The function to invoke. - * @return value - **/ - tap( - value: T, - interceptor: (value: T) => void): T; + * @see _.chunk + */ + chunk(size?: number): LoDashImplicitArrayWrapper; } - interface LoDashWrapperBase { + interface LoDashExplicitArrayWrapper { /** - * @see _.tap - **/ - tap(interceptor: (value: T) => void): TWrapper; + * @see _.chunk + */ + chunk(size?: number): LoDashExplicitArrayWrapper; } - /********* - * Arrays * - **********/ + interface LoDashExplicitObjectWrapper { + /** + * @see _.chunk + */ + chunk(size?: number): LoDashExplicitArrayWrapper; + } //_.compact interface LoDashStatic { /** - * 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 (Array) Returns a new array of filtered values. - **/ - compact(array: Array): T[]; + * 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(array?: List): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.compact - **/ - compact(array: List): T[]; + * @see _.compact + */ + compact(): LoDashImplicitArrayWrapper; } - interface LoDashArrayWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.compact - **/ - compact(): LoDashArrayWrapper; + * @see _.compact + */ + compact(): LoDashImplicitArrayWrapper; } - - //_.chunk + + interface LoDashExplicitArrayWrapper { + /** + * @see _.compact + */ + compact(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.compact + */ + compact(): LoDashExplicitArrayWrapper; + } + + //_.concat DUMMY 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. + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] */ - chunk(array: T[], size?: number): T[][]; + concat(...values: (T[]|List)[]) : T[]; } //_.difference interface LoDashStatic { /** - * Creates an array excluding all values of the provided arrays using strict equality for comparisons - * , i.e. ===. - * @param array The array to process - * @param others The arrays of values to exclude. - * @return Returns a new array of filtered values. - **/ - difference( - array: Array, - ...others: Array[]): T[]; - /** - * @see _.difference - **/ + * 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( - array: List, - ...others: List[]): T[]; + array: T[]|List, + ...values: Array> + ): T[]; } - interface LoDashArrayWrapper { - /** - * @see _.difference - **/ - difference( - ...others: Array[]): LoDashArrayWrapper; + interface LoDashImplicitArrayWrapper { /** - * @see _.difference - **/ - difference( - ...others: List[]): LoDashArrayWrapper; + * @see _.difference + */ + difference(...values: (T[]|List)[]): LoDashImplicitArrayWrapper; } - //_.findIndex - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * This method is like _.find except that it returns the index of the first element that passes - * the callback check, instead of the element itself. - * @param array The array to search. - * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be - * used to create a ".pluck" or ".where" style callback, respectively. - * @param thisArg The this binding of callback. - * @return Returns the index of the found element, else -1. - **/ - findIndex( - array: Array, - callback: ListIterator, - thisArg?: any): number; + * @see _.difference + */ + difference(...values: (TValue[]|List)[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.findIndex - **/ - findIndex( - array: List, - callback: ListIterator, - thisArg?: any): number; + * @see _.difference + */ + difference(...values: (T[]|List)[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.findIndex - **/ - findIndex( - array: Array, - pluckValue: string): number; + * @see _.difference + */ + difference(...values: (TValue[]|List)[]): LoDashExplicitArrayWrapper; + } + //_.differenceBy + interface LoDashStatic { /** - * @see _.findIndex - **/ - findIndex( - array: List, - pluckValue: string): number; + * This method is like _.difference except that it accepts iteratee which is invoked for each element of array + * and values to generate the criterion by which uniqueness is computed. The iteratee is invoked with one + * argument: (value). + * + * @param array The array to inspect. + * @param values The values to exclude. + * @param iteratee The iteratee invoked per element. + * @returns Returns the new array of filtered values. + */ + differenceBy( + array: T[]|List, + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; /** - * @see _.findIndex - **/ - findIndex( - array: Array, - whereDictionary: W): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values?: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.findIndex - **/ - findIndex( - array: List, - whereDictionary: W): number; - } + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; - //_.findLastIndex - interface LoDashStatic { /** - * This method is like _.findIndex except that it iterates over elements of a collection from right to left. - * @param array The array to search. - * @param {(Function|Object|string)} callback The function called per iteration. If a property name or object is provided it will be - * used to create a ".pluck" or ".where" style callback, respectively. - * @param thisArg The this binding of callback. - * @return Returns the index of the found element, else -1. - **/ - findLastIndex( - array: Array, - callback: ListIterator, - thisArg?: any): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: List, - callback: ListIterator, - thisArg?: any): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: Array, - pluckValue: string): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: List, - pluckValue: string): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: Array, - whereDictionary: Dictionary): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; /** - * @see _.findLastIndex - **/ - findLastIndex( - array: List, - whereDictionary: Dictionary): number; + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.differenceBy + */ + differenceBy( + array: T[]|List, + ...values: any[] + ): T[]; } - //_.first - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Gets the first element or first n elements of an array. If a callback is provided - * elements at the beginning of the array are returned as long as the callback returns - * truey. 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 Retrieves the first element of this array. - * @return Returns the first element of `array`. - **/ - first(array: Array): T; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - first(array: List): T; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - first( - array: Array, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - first( - array: List, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - first( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - first( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - first( - array: Array, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - first( - array: List, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - first( - array: Array, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - first( - array: List, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head(array: Array): T; + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.first - **/ - head(array: List): T; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: Array, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: List, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: Array, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: List, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: Array, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - head( - array: List, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - take(array: Array): T; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; /** - * @see _.first - **/ - take(array: List): T; + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.first - **/ - take( - array: Array, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: List, - n: number): T[]; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: Array, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: List, - pluckValue: string): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: Array, - whereValue: W): T[]; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take( - array: List, - whereValue: W): T[]; - } + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; - interface LoDashArrayWrapper { /** - * @see _.first - **/ - first(): T; - - /** - * @see _.first - * @param n The number of elements to return. - **/ - first(n: number): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - first( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - first(pluckValue: string): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - first(whereValue: W): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - head(): T; + * @see _.differenceBy + */ + differenceBy( + values?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - head(n: number): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - head( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - head(pluckValue: string): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - head(whereValue: W): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - **/ - take(): T; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param n The number of elements to return. - **/ - take(n: number): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param callback The function called per element. - * @param [thisArg] The this binding of callback. - **/ - take( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: ((value: T) => any)|string + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param pluckValue "_.pluck" style callback value - **/ - take(pluckValue: string): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + values1?: T[]|List, + values2?: T[]|List, + values3?: T[]|List, + values4?: T[]|List, + values5?: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; /** - * @see _.first - * @param whereValue "_.where" style callback value - **/ - take(whereValue: W): LoDashArrayWrapper; + * @see _.differenceBy + */ + differenceBy( + ...values: any[] + ): LoDashExplicitArrayWrapper; } - //_.flatten + //_.differenceWith DUMMY interface LoDashStatic { /** - * Flattens a nested array (the nesting can be to any depth). If isShallow is truey, the - * array will only be flattened a single level. If a callback is provided each element of - * the array is passed through the callback before flattening. 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 The array to flatten. - * @param shallow If true then only flatten one level, optional, default = false. - * @return `array` flattened. - **/ - flatten(array: Array, isShallow?: boolean): T[]; + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([3, 2, 1], [4, 2]); + * // => [3, 1] + */ + differenceWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.drop + interface LoDashStatic { /** - * @see _.flatten - **/ - flatten(array: List, isShallow?: boolean): T[]; + * 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(array: T[]|List, n?: number): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - array: Array, - isShallow: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.drop + */ + drop(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - array: List, - isShallow: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.drop + */ + drop(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.drop + */ + drop(n?: number): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.drop + */ + drop(n?: number): LoDashExplicitArrayWrapper; + } + //_.dropRight + interface LoDashStatic { /** - * @see _.flatten - **/ - flatten( - array: Array, - isShallow: boolean, - whereValue: W): T[]; + * 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( + array: List, + n?: number + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - array: List, - isShallow: boolean, - whereValue: W): T[]; + * @see _.dropRight + */ + dropRight(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - array: Array, - whereValue: W): T[]; + * @see _.dropRight + */ + dropRight(n?: number): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten( - array: List, - whereValue: W): T[]; + * @see _.dropRight + */ + dropRight(n?: number): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - array: Array, - isShallow: boolean, - pluckValue: string): T[]; + * @see _.dropRight + */ + dropRight(n?: number): LoDashExplicitArrayWrapper; + } + //_.dropRightWhile + interface LoDashStatic { /** - * @see _.flatten - **/ - flatten( - array: List, - isShallow: boolean, - pluckValue: string): T[]; + * 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( + array: List, + predicate?: ListIterator, + thisArg?: any + ): TValue[]; /** - * @see _.flatten - **/ - flatten( - array: Array, - pluckValue: string): T[]; + * @see _.dropRightWhile + */ + dropRightWhile( + array: List, + predicate?: string, + thisArg?: any + ): TValue[]; /** - * @see _.flatten - **/ - flatten( - array: List, - pluckValue: string): T[]; + * @see _.dropRightWhile + */ + dropRightWhile( + array: List, + predicate?: TWhere + ): TValue[]; } - interface LoDashArrayWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.flatten - **/ - flatten(isShallow?: boolean): LoDashArrayWrapper; - - /** - * @see _.flatten - **/ - flatten( - isShallow: boolean, - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.flatten - **/ - flatten( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.flatten - **/ - flatten( - isShallow: boolean, - pluckValue: string): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.flatten - **/ - flatten( - pluckValue: string): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.flatten - **/ - flatten( - isShallow: boolean, - whereValue: W): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.flatten - **/ - flatten( - whereValue: W): LoDashArrayWrapper; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; } - //_.indexOf - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Gets the index at which the first occurrence of value is found using strict equality - * for comparisons, i.e. ===. If the array is already sorted providing true for fromIndex - * will run a faster binary search. - * @param array The array to search. - * @param value The value to search for. - * @param fromIndex The index to search from. - * @return The index of `value` within `array`. - **/ - indexOf( - array: Array, - value: T): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.indexOf - **/ - indexOf( - array: List, - value: T): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.indexOf - * @param fromIndex The index to search from - **/ - indexOf( - array: Array, - value: T, - fromIndex: number): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.indexOf - * @param fromIndex The index to search from - **/ - indexOf( - array: List, - value: T, - fromIndex: number): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.indexOf - * @param isSorted True to perform a binary search on a sorted array. - **/ - indexOf( - array: Array, - value: T, - isSorted: boolean): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.indexOf - * @param isSorted True to perform a binary search on a sorted array. - **/ - indexOf( - array: List, - value: T, - isSorted: boolean): number; + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; } - //_.initial + //_.dropWhile interface LoDashStatic { /** - * Gets all but the last element or last n elements of an array. If a callback is provided - * elements at the end of the array are excluded from the result as long as the callback - * returns truey. 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 The array to query. - * @param n Leaves this many elements behind, optional. - * @return Returns everything but the last `n` elements of `array`. - **/ - initial( - array: Array): T[]; + * 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( + array: List, + predicate?: ListIterator, + thisArg?: any + ): TValue[]; /** - * @see _.initial - **/ - initial( - array: List): T[]; + * @see _.dropWhile + */ + dropWhile( + array: List, + predicate?: string, + thisArg?: any + ): TValue[]; /** - * @see _.initial - * @param n The number of elements to exclude. - **/ - initial( - array: Array, - n: number): T[]; + * @see _.dropWhile + */ + dropWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.initial - * @param n The number of elements to exclude. - **/ - initial( - array: List, - n: number): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.initial - * @param callback The function called per element - **/ - initial( - array: Array, - callback: ListIterator): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.initial - * @param callback The function called per element - **/ - initial( - array: List, - callback: ListIterator): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.initial - * @param pluckValue _.pluck style callback - **/ - initial( - array: Array, - pluckValue: string): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.initial - * @param pluckValue _.pluck style callback - **/ - initial( - array: List, - pluckValue: string): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.initial - * @param whereValue _.where style callback - **/ - initial( - array: Array, - whereValue: W): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.initial - * @param whereValue _.where style callback - **/ - initial( - array: List, - whereValue: W): T[]; - } + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; - //_.intersection - interface LoDashStatic { /** - * Creates an array of unique values present in all provided arrays using strict - * equality for comparisons, i.e. ===. - * @param arrays The arrays to inspect. - * @return Returns an array of composite values. - **/ - intersection(...arrays: Array[]): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.intersection - **/ - intersection(...arrays: List[]): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; } - //_.last - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Gets the last element or last n elements of an array. If a callback is provided - * elements at the end of the array are returned as long as the callback returns truey. - * 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 The array to query. - * @return Returns the last element(s) of array. - **/ - last(array: Array): T; + * @see _.dropWhile + */ + dropWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.last - **/ - last(array: List): T; + * @see _.dropWhile + */ + dropWhile( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.last - * @param n The number of elements to return - **/ - last( - array: Array, - n: number): T[]; + * @see _.dropWhile + */ + dropWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + //_.fill + interface LoDashStatic { /** - * @see _.last - * @param n The number of elements to return - **/ - last( - array: List, - n: number): T[]; + * 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( + array: any[], + value: T, + start?: number, + end?: number + ): T[]; /** - * @see _.last - * @param callback The function called per element - **/ - last( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.fill + */ + fill( + array: List, + value: T, + start?: number, + end?: number + ): List; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.last - * @param callback The function called per element - **/ - last( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.last - * @param pluckValue _.pluck style callback - **/ - last( - array: Array, - pluckValue: string): T[]; + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashImplicitObjectWrapper>; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.last - * @param pluckValue _.pluck style callback - **/ - last( - array: List, - pluckValue: string): T[]; + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.last - * @param whereValue _.where style callback - **/ - last( - array: Array, - whereValue: W): T[]; + * @see _.fill + */ + fill( + value: T, + start?: number, + end?: number + ): LoDashExplicitObjectWrapper>; + } + //_.findIndex + interface LoDashStatic { /** - * @see _.last - * @param whereValue _.where style callback - **/ - last( + * 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( array: List, - whereValue: W): T[]; - } + predicate?: ListIterator, + thisArg?: any + ): number; - //_.lastIndexOf - interface LoDashStatic { /** - * Gets the index at which the last occurrence of value is found using strict equality - * for comparisons, i.e. ===. If fromIndex is negative, it is used as the offset from the - * end of the collection. - * @param array The array to search. - * @param value The value to search for. - * @param fromIndex The index to search from. - * @return The index of the matched value or -1. - **/ - lastIndexOf( - array: Array, - value: T, - fromIndex?: number): number; + * @see _.findIndex + */ + findIndex( + array: List, + predicate?: string, + thisArg?: any + ): number; /** - * @see _.lastIndexOf - **/ - lastIndexOf( + * @see _.findIndex + */ + findIndex( array: List, - value: T, - fromIndex?: number): number; + predicate?: W + ): number; } - //_.pull - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Removes all provided values from the given array using strict equality for comparisons, - * i.e. ===. - * @param array The array to modify. - * @param values The values to remove. - * @return array. - **/ - pull( - array: Array, - ...values: any[]): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator, + thisArg?: any + ): number; /** - * @see _.pull - **/ - pull( - array: List, - ...values: any[]): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: string, + thisArg?: any + ): number; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: W + ): number; } - //_.range - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Creates an array of numbers (positive and/or negative) progressing from start up - * to but not including end. If start is less than stop a zero-length range is created - * unless a negative step is specified. - * @param start The start of the range. - * @param end The end of the range. - * @param step The value to increment or decrement by. - * @return Returns a new range array. - **/ - range( - start: number, - stop: number, - step?: number): number[]; + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator, + thisArg?: any + ): number; /** - * @see _.range - * @param end The end of the range. - * @return Returns a new range array. - * @note If start is not specified the implementation will never pull the step (step = arguments[2] || 0) - **/ - range(stop: number): number[]; + * @see _.findIndex + */ + findIndex( + predicate?: string, + thisArg?: any + ): number; + + /** + * @see _.findIndex + */ + findIndex( + predicate?: W + ): number; } - //_.remove - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Removes all elements from an array that the callback returns truey for and returns - * an array of removed elements. 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 The array to modify. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return A new array of removed elements. - **/ - remove( - array: Array, - callback?: ListIterator, - thisArg?: any): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.remove - **/ - remove( - array: List, - callback?: ListIterator, - thisArg?: any): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: string, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.remove - * @param pluckValue _.pluck style callback - **/ - remove( - array: Array, - pluckValue?: string): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.remove - * @param pluckValue _.pluck style callback - **/ - remove( - array: List, - pluckValue?: string): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.remove - * @param whereValue _.where style callback - **/ - remove( - array: Array, - wherealue?: Dictionary): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: string, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.remove - * @param whereValue _.where style callback - **/ - remove( - array: List, - wherealue?: Dictionary): any[]; + * @see _.findIndex + */ + findIndex( + predicate?: W + ): LoDashExplicitWrapper; } - //_.rest + //_.findLastIndex interface LoDashStatic { /** - * The opposite of _.initial this method gets all but the first element or first n elements of - * an array. If a callback function is provided elements at the beginning of the array are excluded - * from the result as long as the callback returns truey. 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 The array to query. - * @param {(Function|Object|number|string)} [callback=1] The function called per element or the number - * of elements to exclude. If a property name or object is provided it will be used to create a - * ".pluck" or ".where" style callback, respectively. - * @param {*} [thisArg] The this binding of callback. - * @return Returns a slice of array. - **/ - rest(array: Array): T[]; - - /** - * @see _.rest - **/ - rest(array: List): T[]; + * 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( + array: List, + predicate?: ListIterator, + thisArg?: any + ): number; /** - * @see _.rest - **/ - rest( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.findLastIndex + */ + findLastIndex( + array: List, + predicate?: string, + thisArg?: any + ): number; /** - * @see _.rest - **/ - rest( + * @see _.findLastIndex + */ + findLastIndex( array: List, - callback: ListIterator, - thisArg?: any): T[]; + predicate?: W + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.rest - **/ - rest( - array: Array, - n: number): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator, + thisArg?: any + ): number; /** - * @see _.rest - **/ - rest( - array: List, - n: number): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string, + thisArg?: any + ): number; /** - * @see _.rest - **/ - rest( - array: Array, - pluckValue: string): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.rest - **/ - rest( - array: List, - pluckValue: string): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator, + thisArg?: any + ): number; /** - * @see _.rest - **/ - rest( - array: Array, - whereValue: W): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string, + thisArg?: any + ): number; /** - * @see _.rest - **/ - rest( - array: List, - whereValue: W): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): number; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.rest - **/ - drop(array: Array): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.rest - **/ - drop(array: List): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.rest - **/ - drop( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.rest - **/ - drop( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.rest - **/ - drop( - array: Array, - n: number): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: string, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.rest - **/ - drop( - array: List, - n: number): T[]; + * @see _.findLastIndex + */ + findLastIndex( + predicate?: W + ): LoDashExplicitWrapper; + } - /** - * @see _.rest - **/ - drop( - array: Array, - pluckValue: string): T[]; + //_.first + interface LoDashStatic { + /** + * @see _.head + */ + first(array: List): T; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.rest - **/ - drop( - array: List, - pluckValue: string): T[]; + * @see _.head + */ + first(): T; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.rest - **/ - drop( - array: Array, - whereValue: W): T[]; + * @see _.head + */ + first(): TResult; + } - /** - * @see _.rest - **/ - drop( - array: List, - whereValue: W): T[]; + interface RecursiveArray extends Array> {} + interface ListOfRecursiveArraysOrValues extends List> {} + //_.flatMap DUMMY + interface LoDashStatic { /** - * @see _.rest - **/ - tail(array: Array): T[]; + * Creates an array of flattened values by running each element in `array` + * through `iteratee` and concating its result to the other mapped values. + * The iteratee is invoked with three arguments: (value, index|key, array). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + flatMap( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.flatten + interface LoDashStatic { /** - * @see _.rest - **/ - tail(array: List): T[]; + * Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only + * flattened a single level. + * + * @param array The array to flatten. + * @param isDeep Specify a deep flatten. + * @return Returns the new flattened array. + */ + flatten(array: ListOfRecursiveArraysOrValues, isDeep: boolean): T[]; /** - * @see _.rest - **/ - tail( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.flatten + */ + flatten(array: List): T[]; /** - * @see _.rest - **/ - tail( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.flatten + */ + flatten(array: ListOfRecursiveArraysOrValues): RecursiveArray; + } + interface LoDashImplicitWrapper { /** - * @see _.rest - **/ - tail( - array: Array, - n: number): T[]; + * @see _.flatten + */ + flatten(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.rest - **/ - tail( - array: List, - n: number): T[]; + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.rest - **/ - tail( - array: Array, - pluckValue: string): T[]; + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitWrapper { /** - * @see _.rest - **/ - tail( - array: List, - pluckValue: string): T[]; + * @see _.flatten + */ + flatten(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.rest - **/ - tail( - array: Array, - whereValue: W): T[]; + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.rest - **/ - tail( - array: List, - whereValue: W): T[]; + * @see _.flatten + */ + flatten(isDeep?: boolean): LoDashExplicitArrayWrapper; } - //_.sortedIndex + //_.flattenDeep interface LoDashStatic { /** - * Uses a binary search to determine the smallest index at which a value should be inserted - * into a given sorted array in order to maintain the sort order of the array. If a callback - * is provided it will be executed for value and each element of array to compute their sort - * ranking. The callback is bound to thisArg and invoked with one argument; (value). - * - * 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 The sorted list. - * @param value The value to determine its index within `list`. - * @param callback Iterator to compute the sort ranking of each value, optional. - * @return The index at which value should be inserted into array. - **/ - sortedIndex( - array: Array, - value: T, - callback?: (x: T) => TSort, - thisArg?: any): number; + * Recursively flattens a nested array. + * + * @param array The array to recursively flatten. + * @return Returns the new flattened array. + */ + flattenDeep(array: ListOfRecursiveArraysOrValues): T[]; + } + interface LoDashImplicitWrapper { /** - * @see _.sortedIndex - **/ - sortedIndex( - array: List, - value: T, - callback?: (x: T) => TSort, - thisArg?: any): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.sortedIndex - * @param pluckValue the _.pluck style callback - **/ - sortedIndex( - array: Array, - value: T, - pluckValue: string): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.sortedIndex - * @param pluckValue the _.pluck style callback - **/ - sortedIndex( - array: List, - value: T, - pluckValue: string): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitWrapper { /** - * @see _.sortedIndex - * @param pluckValue the _.where style callback - **/ - sortedIndex( - array: Array, - value: T, - whereValue: W): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.sortedIndex - * @param pluckValue the _.where style callback - **/ - sortedIndex( - array: List, - value: T, - whereValue: W): number; + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; } - //_.union - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Creates an array of unique values, in order, of the provided arrays using strict - * equality for comparisons, i.e. ===. - * @param arrays The arrays to inspect. - * @return Returns an array of composite values. - **/ - union(...arrays: Array[]): T[]; + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; + } + //_.fromPairs DUMMY + interface LoDashStatic { /** - * @see _.union - **/ - union(...arrays: List[]): T[]; + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + */ + fromPairs( + array: any[]|List + ): any[]; } - //_.uniq + //_.head 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(array: Array, isSorted?: boolean): T[]; + * Gets the first element of array. + * + * @alias _.first + * + * @param array The array to query. + * @return Returns the first element of array. + */ + head(array: List): T; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - **/ - uniq(array: List, isSorted?: boolean): T[]; + * @see _.first + */ + head(): T; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - **/ - uniq( - array: Array, - isSorted: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.first + */ + head(): TResult; + } + //_.indexOf + interface LoDashStatic { /** - * @see _.uniq - **/ - uniq( + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-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. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + indexOf( array: List, - isSorted: boolean, - callback: ListIterator, - thisArg?: any): T[]; + value: T, + fromIndex?: boolean|number + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - **/ - uniq( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.indexOf + */ + indexOf( + value: T, + fromIndex?: boolean|number + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - **/ - uniq( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.indexOf + */ + indexOf( + value: TValue, + fromIndex?: boolean|number + ): number; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - array: Array, - isSorted: boolean, - pluckValue: string): T[]; + * @see _.indexOf + */ + indexOf( + value: T, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - array: List, - isSorted: boolean, - pluckValue: string): T[]; + * @see _.indexOf + */ + indexOf( + value: TValue, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + //_.intersectionBy DUMMY + interface LoDashStatic { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - array: Array, - pluckValue: string): T[]; + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of shared values. + * @example + * + * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * // => [2.1] + * + * // using the `_.property` iteratee shorthand + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + intersectionBy( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.intersectionWith DUMMY + interface LoDashStatic { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - array: List, - pluckValue: string): T[]; + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ + intersectionWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.join + interface LoDashStatic { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - array: Array, - isSorted: boolean, - whereValue: W): T[]; + * Converts all elements in `array` into a string separated by `separator`. + * + * @param array The array to convert. + * @param separator The element separator. + * @returns Returns the joined string. + */ + join( + array: List, + separator?: string + ): string; + } + interface LoDashImplicitWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - array: List, - isSorted: boolean, - whereValue: W): T[]; + * @see _.join + */ + join(separator?: string): string; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - array: Array, - whereValue: W): T[]; + * @see _.join + */ + join(separator?: string): string; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - array: List, - whereValue: W): T[]; + * @see _.join + */ + join(separator?: string): string; + } + interface LoDashExplicitWrapper { /** - * @see _.uniq - **/ - unique(array: Array, isSorted?: boolean): T[]; + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - **/ - unique(array: List, isSorted?: boolean): T[]; + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - **/ - unique( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.join + */ + join(separator?: string): LoDashExplicitWrapper; + } + //_.pullAll DUMMY + interface LoDashStatic { /** - * @see _.uniq - **/ - unique( - array: List, - callback: ListIterator, - thisArg?: any): T[]; + * This method is like `_.pull` except that it accepts an array of values to remove. + * + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, [2, 3]); + * console.log(array); + * // => [1, 1] + */ + pullAll( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.pullAllBy DUMMY + interface LoDashStatic { /** - * @see _.uniq - **/ - unique( - array: Array, - isSorted: boolean, - callback: ListIterator, - thisArg?: any): T[]; + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to to generate the criterion + * by which uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + pullAllBy( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.reverse DUMMY + interface LoDashStatic { + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @memberOf _ + * @category Array + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + reverse( + array: any[]|List, + ...values: any[] + ): any[]; + } + //_.sortedIndexOf + interface LoDashStatic { /** - * @see _.uniq - **/ - unique( + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([1, 1, 2, 2], 2); + * // => 2 + */ + sortedIndexOf( array: List, - isSorted: boolean, - callback: ListIterator, - thisArg?: any): T[]; + value: T + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - array: Array, - isSorted: boolean, - pluckValue: string): T[]; + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: T + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - array: List, - isSorted: boolean, - pluckValue: string): T[]; + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: TValue + ): number; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - array: Array, - pluckValue: string): T[]; + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: T + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - array: List, - pluckValue: string): T[]; + * @see _.sortedIndexOf + */ + sortedIndexOf( + value: TValue + ): LoDashExplicitWrapper; + } + //_.initial + interface LoDashStatic { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - array: Array, - whereValue?: W): T[]; + * Gets all but the last element of array. + * + * @param array The array to query. + * @return Returns the slice of array. + */ + initial(array: List): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - array: List, - whereValue?: W): T[]; + * @see _.initial + */ + initial(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - array: Array, - isSorted: boolean, - whereValue?: W): T[]; + * @see _.initial + */ + initial(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - array: List, - isSorted: boolean, - whereValue?: W): T[]; + * @see _.initial + */ + initial(): LoDashExplicitArrayWrapper; } - interface LoDashArrayWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - **/ - uniq(isSorted?: boolean): LoDashArrayWrapper; + * @see _.initial + */ + initial(): LoDashExplicitArrayWrapper; + } + //_.intersection + interface LoDashStatic { /** - * @see _.uniq - **/ - uniq( - isSorted: boolean, - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * 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(...arrays: (T[]|List)[]): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - **/ - uniq( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq( - isSorted: boolean, - pluckValue: string): LoDashArrayWrapper; + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - uniq(pluckValue: string): LoDashArrayWrapper; + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - isSorted: boolean, - whereValue: W): LoDashArrayWrapper; + * @see _.intersection + */ + intersection(...arrays: (TResult[]|List)[]): LoDashExplicitArrayWrapper; + } + //_.last + interface LoDashStatic { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - uniq( - whereValue: W): LoDashArrayWrapper; + * Gets the last element of array. + * + * @param array The array to query. + * @return Returns the last element of array. + */ + last(array: List): T; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - **/ - unique(isSorted?: boolean): LoDashArrayWrapper; + * @see _.last + */ + last(): T; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - **/ - unique( - isSorted: boolean, - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.last + */ + last(): T; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.uniq - **/ - unique( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.last + */ + last(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique( - isSorted: boolean, - pluckValue: string): LoDashArrayWrapper; + * @see _.last + */ + last(): LoDashExplicitObjectWrapper; + } + //_.lastIndexOf + interface LoDashStatic { /** - * @see _.uniq - * @param pluckValue _.pluck style callback - **/ - unique(pluckValue: string): LoDashArrayWrapper; + * 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( + array: List, + value: T, + fromIndex?: boolean|number + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - isSorted: boolean, - whereValue: W): LoDashArrayWrapper; + * @see _.lastIndexOf + */ + lastIndexOf( + value: T, + fromIndex?: boolean|number + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.uniq - * @param whereValue _.where style callback - **/ - unique( - whereValue: W): LoDashArrayWrapper; + * @see _.lastIndexOf + */ + lastIndexOf( + value: TResult, + fromIndex?: boolean|number + ): number; } - //_.without - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Creates an array excluding all provided values using strict equality for comparisons, i.e. ===. - * @param array The array to filter. - * @param values The value(s) to exclude. - * @return A new array of filtered values. - **/ - without( - array: Array, - ...values: T[]): T[]; + * @see _.lastIndexOf + */ + lastIndexOf( + value: T, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.without - **/ - without( - array: List, - ...values: T[]): T[]; + * @see _.lastIndexOf + */ + lastIndexOf( + value: TResult, + fromIndex?: boolean|number + ): LoDashExplicitWrapper; } - //_.xor + //_.pull interface LoDashStatic { /** - * Creates an array that is the symmetric difference of the provided arrays. - * @param array The array to process - * @param others The arrays of values to calculate the symmetric difference. - * @return Returns a new array of filtered values. - **/ - xor( - array: Array, - ...others: Array[]): T[]; + * 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( + array: T[], + ...values: T[] + ): T[]; + /** - * @see _.xor - **/ - xor( + * @see _.pull + */ + pull( array: List, - ...others: List[]): T[]; + ...values: T[] + ): List; } - interface LoDashArrayWrapper { - /** - * @see _.xor - **/ - xor( - ...others: Array[]): LoDashArrayWrapper; + interface LoDashImplicitArrayWrapper { /** - * @see _.xor - **/ - xor( - ...others: List[]): LoDashArrayWrapper; + * @see _.pull + */ + pull(...values: T[]): LoDashImplicitArrayWrapper; } - - //_.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 Arrays to process. - * @return A new array of grouped elements. - **/ - zip(...arrays: any[][]): any[][]; + interface LoDashImplicitObjectWrapper { /** - * @see _.zip - **/ - zip(...arrays: any[]): any[]; + * @see _.pull + */ + pull(...values: TValue[]): LoDashImplicitObjectWrapper>; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.zip - **/ - unzip(...arrays: any[][]): any[][]; + * @see _.pull + */ + pull(...values: T[]): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.zip - **/ - unzip(...arrays: any[]): any[]; + * @see _.pull + */ + pull(...values: TValue[]): LoDashExplicitObjectWrapper>; } - interface LoDashArrayWrapper { + //_.pullAt + interface LoDashStatic { /** - * @see _.zip - **/ - zip(...arrays: any[][]): _.LoDashArrayWrapper; + * 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( + array: List, + ...indexes: (number|number[])[] + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.zip - **/ - unzip(...arrays: any[]): _.LoDashArrayWrapper; + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; } - //_.zipObject - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Creates an object composed from arrays of keys and values. Provide either a single - * two dimensional array, i.e. [[key1, value1], [key2, value2]] or two arrays, one of - * keys and one of corresponding values. - * @param keys The array of keys. - * @param values The array of values. - * @return An object composed of the given keys and corresponding values. - **/ - zipObject( - keys: List, - values: List): TResult; + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.object - **/ - object( - keys: List, - values: List): TResult; + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; } - /* ************* - * Collections * - ************* */ + interface LoDashExplicitObjectWrapper { + /** + * @see _.pullAt + */ + pullAt(...indexes: (number|number[])[]): LoDashExplicitArrayWrapper; + } - //_.at + //_.remove interface LoDashStatic { /** - * Creates an array of elements from the specified indexes, or keys, of the collection. - * Indexes may be specified as individual arguments or as arrays of indexes. - * @param collection The collection to iterate over. - * @param indexes The indexes of collection to retrieve, specified as individual indexes or - * arrays of indexes. - * @return A new array of elements corresponding to the provided indexes. - **/ - at( - collection: Array, - indexes: number[]): T[]; + * 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( + array: List, + predicate?: ListIterator, + thisArg?: any + ): T[]; /** - * @see _.at - **/ - at( - collection: List, - indexes: number[]): T[]; + * @see _.remove + */ + remove( + array: List, + predicate?: string, + thisArg?: any + ): T[]; /** - * @see _.at - **/ - at( - collection: Dictionary, - indexes: number[]): T[]; + * @see _.remove + */ + remove( + array: List, + predicate?: W + ): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.at - **/ - at( - collection: Array, - ...indexes: number[]): T[]; + * @see _.remove + */ + remove( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.at - **/ - at( - collection: List, - ...indexes: number[]): T[]; + * @see _.remove + */ + remove( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.at - **/ - at( - collection: Dictionary, - ...indexes: number[]): T[]; + * @see _.remove + */ + remove( + predicate?: W + ): LoDashImplicitArrayWrapper; } - //_.contains - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Checks if a given value is present in a collection using strict equality for comparisons, - * i.e. ===. If fromIndex is negative, it is used as the offset from the end of the collection. - * @param collection The collection to iterate over. - * @param target The value to check for. - * @param fromIndex The index to search from. - * @return True if the target element is found, else false. - **/ - contains( - collection: Array, - target: T, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.contains - **/ - contains( - collection: List, - target: T, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.contains - * @param dictionary The dictionary to iterate over. - * @param key The key in the dictionary to search for. - **/ - contains( - dictionary: Dictionary, - key: string, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + predicate?: W + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.contains - * @param searchString the string to search - * @param targetString the string to search for - **/ - contains( - searchString: string, - targetString: string, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.contains - **/ - include( - collection: Array, - target: T, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.contains - **/ - include( - collection: List, - target: T, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + predicate?: W + ): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.contains - **/ - include( - dictionary: Dictionary, - key: string, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; /** - * @see _.contains - **/ - include( - searchString: string, - targetString: string, - fromIndex?: number): boolean; + * @see _.remove + */ + remove( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.remove + */ + remove( + predicate?: W + ): LoDashExplicitArrayWrapper; } - //_.countBy + //_.tail interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element - * of collection through the callback. The corresponding value of each key is the number - * of times the key was returned by the callback. The callback is bound to thisArg and - * invoked with three arguments; (value, index|key, collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the composed aggregate object. - **/ - countBy( - collection: Array, - callback?: ListIterator, - thisArg?: any): Dictionary; + * Gets all but the first element of array. + * + * @alias _.tail + * + * @param array The array to query. + * @return Returns the slice of array. + */ + tail(array: List): T[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: List, - callback?: ListIterator, - thisArg?: any): Dictionary; + * @see _.tail + */ + tail(): LoDashImplicitArrayWrapper; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): Dictionary; + * @see _.tail + */ + tail(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: Array, - callback: string, - thisArg?: any): Dictionary; + * @see _.tail + */ + tail(): LoDashExplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: List, - callback: string, - thisArg?: any): Dictionary; + * @see _.tail + */ + tail(): LoDashExplicitArrayWrapper; + } + //_.slice + interface LoDashStatic { /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - collection: Dictionary, - callback: string, - thisArg?: any): Dictionary; + * 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( + array: T[], + start?: number, + end?: number + ): T[]; } - interface LoDashArrayWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.countBy - **/ - countBy( - callback?: ListIterator, - thisArg?: any): LoDashObjectWrapper>; + * @see _.slice + */ + slice( + start?: number, + end?: number + ): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.countBy - * @param callback Function name - **/ - countBy( - callback: string, - thisArg?: any): LoDashObjectWrapper>; + * @see _.slice + */ + slice( + start?: number, + end?: number + ): LoDashExplicitArrayWrapper; } - //_.every + //_.sortedIndex interface LoDashStatic { /** - * Checks if the given callback returns truey value for all elements of a collection. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, - * collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return True if all elements passed the callback check, else false. - **/ - every( - collection: Array, - callback?: ListIterator, - thisArg?: any): boolean; + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 5], 4); + * // => 0 + */ + sortedIndex( + array: List, + value: T + ): number; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: List, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: Array, - pluckValue: string): boolean; + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: List, - pluckValue: string): boolean; + * @see _.sortedIndex + */ + sortedIndex( + array: List, + value: T + ): number; + } + interface LoDashImplicitWrapper { /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - every( - collection: Dictionary, - pluckValue: string): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: string + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.every - * @param whereValue _.where style callback - **/ - every( - collection: Array, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; /** - * @see _.every - * @param whereValue _.where style callback - **/ - every( - collection: List, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.every - * @param whereValue _.where style callback - **/ - every( - collection: Dictionary, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; /** - * @see _.every - **/ - all( - collection: Array, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; /** - * @see _.every - **/ - all( - collection: List, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): number; + } + interface LoDashExplicitWrapper { /** - * @see _.every - **/ - all( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: string + ): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - all( - collection: Array, - pluckValue: string): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - all( - collection: List, - pluckValue: string): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.every - * @param pluckValue _.pluck style callback - **/ - all( - collection: Dictionary, - pluckValue: string): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.every - * @param whereValue _.where style callback - **/ - all( - collection: Array, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.every - * @param whereValue _.where style callback - **/ - all( - collection: List, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; /** - * @see _.every - * @param whereValue _.where style callback - **/ - all( - collection: Dictionary, - whereValue: W): boolean; + * @see _.sortedIndex + */ + sortedIndex( + value: T + ): LoDashExplicitWrapper; + + } - //_.filter + //_.sortedIndexBy interface LoDashStatic { /** - * Iterates over elements of a collection, returning an array of all elements the - * callback returns truey for. The callback is bound to thisArg and invoked with three - * arguments; (value, index|key, collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param context The this binding of callback. - * @return Returns a new array of elements that passed the callback check. - **/ - filter( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * + * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); + * // => 1 + * + * // using the `_.property` iteratee shorthand + * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * // => 0 + */ + sortedIndexBy( + array: List, + value: T, + iteratee: (x: T) => TSort + ): number; /** - * @see _.filter - **/ - filter( - collection: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: (x: T) => any + ): number; /** - * @see _.filter - **/ - filter( - collection: Dictionary, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: string + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Array, - pluckValue: string): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: W + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: List, - pluckValue: string): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + array: List, + value: T, + iteratee: Object + ): number; + } + interface LoDashImplicitWrapper { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Dictionary, - pluckValue: string): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: string, + iteratee: (x: string) => TSort + ): number; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Array, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: List, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - collection: Dictionary, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): number; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.filter - **/ - select( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; /** - * @see _.filter - **/ - select( - collection: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => any + ): number; /** - * @see _.filter - **/ - select( - collection: Dictionary, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Array, - pluckValue: string): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): number; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: List, - pluckValue: string): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: Object + ): number; + } + interface LoDashExplicitWrapper { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Dictionary, - pluckValue: string): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: string, + iteratee: (x: string) => TSort + ): LoDashExplicitWrapper; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Array, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: List, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - collection: Dictionary, - whereValue: W): T[]; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; } - interface LoDashArrayWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.filter - **/ - filter( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - pluckValue: string): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: (x: T) => any + ): LoDashExplicitWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - filter( - whereValue: W): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; /** - * @see _.filter - **/ - select( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - pluckValue: string): LoDashArrayWrapper; + * @see _.sortedIndexBy + */ + sortedIndexBy( + value: T, + iteratee: Object + ): LoDashExplicitWrapper; + } + //_.sortedLastIndex + interface LoDashStatic { /** - * @see _.filter - * @param pluckValue _.pluck style callback - **/ - select( - whereValue: W): LoDashArrayWrapper; - } + * 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. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * _.sortedLastIndex([4, 5], 4); + * // => 1 + */ + sortedLastIndex( + array: List, + value: T + ): number; - interface LoDashObjectWrapper { /** - * @see _.filter - **/ - filter( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper; - } + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; - //_.find - interface LoDashStatic { /** - * Iterates over elements of a collection, returning the first element that the callback - * returns truey for. The callback is bound to thisArg and invoked with three arguments; - * (value, index|key, collection). - * - * 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 collection Searches for a value in this list. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The found element, else undefined. - **/ - find( - collection: Array, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; /** - * @see _.find - **/ - find( - collection: List, - callback: ListIterator, - thisArg?: any): T; + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; /** - * @see _.find - **/ + * @see _.sortedLastIndex + */ + sortedLastIndex( + array: List, + value: T + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: string + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: string + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndex + */ + sortedLastIndex( + value: T + ): LoDashExplicitWrapper; + } + + //_.sortedLastIndexBy + interface LoDashStatic { + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted into `array`. + * @example + * + * // using the `_.property` iteratee shorthand + * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * // => 1 + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: (x: T) => any + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: W + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + array: List, + value: T, + iteratee: Object + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: string, + iteratee: (x: string) => TSort + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => any + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): number; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: Object + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: string, + iteratee: (x: string) => TSort + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => TSort + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: (x: T) => any + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: string + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: W + ): LoDashExplicitWrapper; + + /** + * @see _.sortedLastIndexBy + */ + sortedLastIndexBy( + value: T, + iteratee: Object + ): LoDashExplicitWrapper; + } + + //_.sortedLastIndexOf DUMMY + interface LoDashStatic { + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * // => 3 + */ + sortedLastIndexOf( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.tail + interface LoDashStatic { + /** + * @see _.rest + */ + tail(array: List): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.rest + */ + tail(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.rest + */ + tail(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.rest + */ + tail(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.rest + */ + tail(): LoDashExplicitArrayWrapper; + } + + //_.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( + array: List, + n?: number + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.take + */ + take(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.take + */ + take(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.take + */ + take(n?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.take + */ + take(n?: number): LoDashExplicitArrayWrapper; + } + + //_.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( + array: List, + n?: number + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.takeRight + */ + takeRight(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.takeRight + */ + takeRight(n?: number): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.takeRight + */ + takeRight(n?: number): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.takeRight + */ + takeRight(n?: number): LoDashExplicitArrayWrapper; + } + + //_.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( + array: List, + predicate?: ListIterator, + thisArg?: any + ): TValue[]; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + array: List, + predicate?: string, + thisArg?: any + ): TValue[]; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeRightWhile + */ + takeRightWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.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( + array: List, + predicate?: ListIterator, + thisArg?: any + ): TValue[]; + + /** + * @see _.takeWhile + */ + takeWhile( + array: List, + predicate?: string, + thisArg?: any + ): TValue[]; + + /** + * @see _.takeWhile + */ + takeWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.takeWhile + */ + takeWhile( + predicate?: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.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(...arrays: List[]): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; + + /** + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; + + /** + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + //_.unionBy + interface LoDashStatic { + /** + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @param arrays The arrays to inspect. + * @param iteratee The iteratee invoked per element. + * @return Returns the new array of combined values. + */ + unionBy( + arrays: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays1: T[]|List, + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): T[]; + + /** + * @see _.unionBy + */ + unionBy( + arrays: T[]|List, + ...iteratee: any[] + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashImplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unionBy + */ + unionBy( + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: (value: T) => any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + arrays2: T[]|List, + arrays3: T[]|List, + arrays4: T[]|List, + arrays5: T[]|List, + iteratee?: W + ): LoDashExplicitArrayWrapper; + + /** + * @see _.unionBy + */ + unionBy( + ...iteratee: any[] + ): LoDashExplicitArrayWrapper; + } + + //_.uniq + interface LoDashStatic { + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + */ + uniq( + array: List + ): T[]; + + /** + * @see _.uniq + */ + uniq( + array: List + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + + /** + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + uniq(): LoDashImplicitArrayWrapper; + + /** + * @see _.uniq + */ + uniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + + /** + * @see _.uniq + */ + uniq(): LoDashExplicitArrayWrapper; + } + + //_.uniqBy + interface LoDashStatic { + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // using the `_.property` iteratee shorthand + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + uniqBy( + array: List, + iteratee: ListIterator + ): T[]; + + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: ListIterator + ): T[]; + + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: string + ): T[]; + + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: Object + ): T[]; + + /** + * @see _.uniqBy + */ + uniqBy( + array: List, + iteratee: TWhere + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: Object + ): LoDashImplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: Object + ): LoDashExplicitArrayWrapper; + + /** + * @see _.uniqBy + */ + uniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.sortedUniq + interface LoDashStatic { + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + sortedUniq( + array: List + ): T[]; + + /** + * @see _.sortedUniq + */ + sortedUniq( + array: List + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + sortedUniq(): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniq + */ + sortedUniq(): LoDashExplicitArrayWrapper; + } + + //_.sortedUniqBy + interface LoDashStatic { + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.2] + */ + sortedUniqBy( + array: List, + iteratee: ListIterator + ): T[]; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: ListIterator + ): T[]; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: string + ): T[]; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: Object + ): T[]; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + array: List, + iteratee: TWhere + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: Object + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: Object + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortedUniqBy + */ + sortedUniqBy( + iteratee: TWhere + ): LoDashExplicitArrayWrapper; + } + + //_.unionWith DUMMY + interface LoDashStatic { + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + unionWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.uniqWith DUMMY + interface LoDashStatic { + /** + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The comparator is invoked with + * two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + uniqWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.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(array: List>): T[][]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unzip + */ + unzip(): LoDashExplicitArrayWrapper; + } + + //_.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( + array: List>, + iteratee?: MemoIterator, + thisArg?: any + ): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.unzipWith + */ + unzipWith( + iteratee?: MemoIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unzipWith + */ + unzipWith( + iteratee?: MemoIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + //_.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( + array: List, + ...values: T[] + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.without + */ + without(...values: T[]): LoDashExplicitArrayWrapper; + } + + //_.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(...arrays: List[]): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.xor + */ + xor(...arrays: List[]): LoDashExplicitArrayWrapper; + } + + //_.xorBy DUMMY + interface LoDashStatic { + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by which + * uniqueness is computed. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * // => [1.2, 4.3] + * + * // using the `_.property` iteratee shorthand + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + xorBy( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.xorWith DUMMY + interface LoDashStatic { + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The comparator is invoked with + * two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + xorWith( + array: any[]|List, + ...values: any[] + ): any[]; + } + + //_.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(...arrays: List[]): T[][]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.zip + */ + zip(...arrays: List[]): _.LoDashExplicitArrayWrapper; + } + + //_.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. + * + * @param props The property names. + * @param values The property values. + * @return Returns the new object. + */ + zipObject( + props: List|List>, + values?: List + ): TResult; + + /** + * @see _.zipObject + */ + zipObject( + props: List|List>, + values?: List + ): TResult; + + /** + * @see _.zipObject + */ + zipObject( + props: List|List>, + values?: List + ): _.Dictionary; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashImplicitObjectWrapper<_.Dictionary>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper; + + /** + * @see _.zipObject + */ + zipObject( + values?: List + ): _.LoDashExplicitObjectWrapper<_.Dictionary>; + } + + //_.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(...args: any[]): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.zipWith + */ + zipWith(...args: any[]): LoDashImplicitArrayWrapper; + } + + /********* + * Chain * + *********/ + + //_.chain + interface LoDashStatic { + /** + * Creates a lodash object that wraps value with explicit method chaining enabled. + * + * @param value The value to wrap. + * @return Returns the new lodash wrapper instance. + */ + chain(value: number): LoDashExplicitWrapper; + chain(value: string): LoDashExplicitWrapper; + chain(value: boolean): LoDashExplicitWrapper; + chain(value: T[]): LoDashExplicitArrayWrapper; + chain(value: T): LoDashExplicitObjectWrapper; + chain(value: any): LoDashExplicitWrapper; + } + + interface LoDashImplicitWrapper { + /** + * @see _.chain + */ + chain(): LoDashExplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.chain + */ + chain(): LoDashExplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.chain + */ + chain(): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.chain + */ + chain(): TWrapper; + } + + //_.tap + interface LoDashStatic { + /** + * This method invokes interceptor and returns value. The interceptor is bound to thisArg and invoked with one + * argument; (value). The purpose of this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @param value The value to provide to interceptor. + * @param interceptor The function to invoke. + * @parem thisArg The this binding of interceptor. + * @return Returns value. + **/ + tap( + value: T, + interceptor: (value: T) => void, + thisArg?: any + ): T; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.tap + */ + tap( + interceptor: (value: T) => void, + thisArg?: any + ): TWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.tap + */ + tap( + interceptor: (value: T) => void, + thisArg?: any + ): TWrapper; + } + + //_.thru + interface LoDashStatic { + /** + * This method is like _.tap except that it returns the result of interceptor. + * + * @param value The value to provide to interceptor. + * @param interceptor The function to invoke. + * @param thisArg The this binding of interceptor. + * @return Returns the result of interceptor. + */ + thru( + value: T, + interceptor: (value: T) => TResult, + thisArg?: any + ): TResult; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult, + thisArg?: any): LoDashImplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult, + thisArg?: any): LoDashImplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult, + thisArg?: any): LoDashImplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult, + thisArg?: any): LoDashImplicitObjectWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult[], + thisArg?: any): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult, + thisArg?: any + ): LoDashExplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult, + thisArg?: any + ): LoDashExplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult, + thisArg?: any + ): LoDashExplicitWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult, + thisArg?: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.thru + */ + thru( + interceptor: (value: T) => TResult[], + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + //_.prototype.commit + interface LoDashImplicitWrapperBase { + /** + * Executes the chained sequence and returns the wrapped result. + * + * @return Returns the new lodash wrapper instance. + */ + commit(): TWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.commit + */ + commit(): TWrapper; + } + + //_.prototype.concat + interface LoDashImplicitWrapperBase { + /** + * Creates a new array joining a wrapped array with any additional arrays and/or values. + * + * @param items + * @return Returns the new concatenated array. + */ + concat(...items: Array>): LoDashImplicitArrayWrapper; + + /** + * @see _.concat + */ + concat(...items: Array>): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.concat + */ + concat(...items: Array>): LoDashExplicitArrayWrapper; + + /** + * @see _.concat + */ + concat(...items: Array>): LoDashExplicitArrayWrapper; + } + + //_.prototype.plant + interface LoDashImplicitWrapperBase { + /** + * Creates a clone of the chained sequence planting value as the wrapped value. + * @param value The value to plant as the wrapped value. + * @return Returns the new lodash wrapper instance. + */ + plant(value: number): LoDashImplicitWrapper; + + /** + * @see _.plant + */ + plant(value: string): LoDashImplicitStringWrapper; + + /** + * @see _.plant + */ + plant(value: boolean): LoDashImplicitWrapper; + + /** + * @see _.plant + */ + plant(value: number[]): LoDashImplicitNumberArrayWrapper; + + /** + * @see _.plant + */ + plant(value: T[]): LoDashImplicitArrayWrapper; + + /** + * @see _.plant + */ + plant(value: T): LoDashImplicitObjectWrapper; + + /** + * @see _.plant + */ + plant(value: any): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.plant + */ + plant(value: number): LoDashExplicitWrapper; + + /** + * @see _.plant + */ + plant(value: string): LoDashExplicitStringWrapper; + + /** + * @see _.plant + */ + plant(value: boolean): LoDashExplicitWrapper; + + /** + * @see _.plant + */ + plant(value: number[]): LoDashExplicitNumberArrayWrapper; + + /** + * @see _.plant + */ + plant(value: T[]): LoDashExplicitArrayWrapper; + + /** + * @see _.plant + */ + plant(value: T): LoDashExplicitObjectWrapper; + + /** + * @see _.plant + */ + plant(value: any): LoDashExplicitWrapper; + } + + //_.prototype.reverse + interface LoDashImplicitArrayWrapper { + /** + * Reverses the wrapped array so the first element becomes the last, the second element becomes the second to + * last, and so on. + * + * Note: This method mutates the wrapped array. + * + * @return Returns the new reversed lodash wrapper instance. + */ + reverse(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.reverse + */ + reverse(): LoDashExplicitArrayWrapper; + } + + //_.prototype.toJSON + interface LoDashWrapperBase { + /** + * @see _.value + */ + toJSON(): T; + } + + //_.prototype.toString + interface LoDashWrapperBase { + /** + * Produces the result of coercing the unwrapped value to a string. + * + * @return Returns the coerced string value. + */ + toString(): string; + } + + //_.prototype.value + interface LoDashWrapperBase { + /** + * Executes the chained sequence to extract the unwrapped value. + * + * @alias _.toJSON, _.valueOf + * + * @return Returns the resolved unwrapped value. + */ + value(): T; + } + + //_.valueOf + interface LoDashWrapperBase { + /** + * @see _.value + */ + valueOf(): T; + } + + /************** + * Collection * + **************/ + + //_.at + interface LoDashStatic { + /** + * Creates an array of elements corresponding to the given keys, or indexes, of collection. Keys may be + * specified as individual arguments or as arrays of keys. + * + * @param collection The collection to iterate over. + * @param props The property names or indexes of elements to pick, specified individually or in arrays. + * @return Returns the new array of picked elements. + */ + at( + collection: List|Dictionary, + ...props: (number|string|(number|string)[])[] + ): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.at + */ + at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper; + } + + //_.countBy + interface LoDashStatic { + /** + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The + * iteratee is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * 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 collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + countBy( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: string, + thisArg?: any + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: W + ): Dictionary; + + /** + * @see _.countBy + */ + countBy( + collection: List|Dictionary|NumericDictionary, + iteratee?: Object + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: string, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: string, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.countBy + */ + countBy( + iteratee?: ListIterator|DictionaryIterator|NumericDictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.countBy + */ + countBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + } + + //_.each + interface LoDashStatic { + /** + * @see _.forEach + */ + each( + collection: T[], + iteratee?: ListIterator, + thisArg?: any + ): T[]; + + /** + * @see _.forEach + */ + each( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): List; + + /** + * @see _.forEach + */ + each( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.forEach + */ + each( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + + /** + * @see _.forEach + */ + each( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEach + */ + each( + iteratee: ListIterator, + thisArg?: any + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEach + */ + each( + iteratee: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEach + */ + each( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEach + */ + each( + iteratee: ListIterator, + thisArg?: any + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEach + */ + each( + iteratee: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEach + */ + each( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper; + } + + //_.eachRight + interface LoDashStatic { + /** + * @see _.forEachRight + */ + eachRight( + collection: T[], + iteratee?: ListIterator, + thisArg?: any + ): T[]; + + /** + * @see _.forEachRight + */ + eachRight( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): List; + + /** + * @see _.forEachRight + */ + eachRight( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.forEachRight + */ + eachRight( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + + /** + * @see _.forEachRight + */ + eachRight( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator, + thisArg?: any + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator, + thisArg?: any + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEachRight + */ + eachRight( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper; + } + + //_.every + interface LoDashStatic { + /** + * Checks if predicate returns truthy for all elements of collection. Iteration is stopped once predicate + * returns falsey. The predicate is invoked with three arguments: (value, index|key, collection). + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @return Returns true if all elements pass the predicate check, else false. + */ + every( + collection: List, + predicate?: ListIterator + ): boolean; + + /** + * @see _.every + */ + every( + collection: Dictionary, + predicate?: DictionaryIterator + ): boolean; + + /** + * @see _.every + */ + every( + collection: NumericDictionary, + predicate?: NumericDictionaryIterator + ): boolean; + + /** + * @see _.every + */ + every( + collection: List|Dictionary|NumericDictionary, + predicate?: string|any[] + ): boolean; + + /** + * @see _.every + */ + every( + collection: List|Dictionary|NumericDictionary, + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.every + */ + every( + predicate?: ListIterator|NumericDictionaryIterator + ): boolean; + + /** + * @see _.every + */ + every( + predicate?: string|any[] + ): boolean; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.every + */ + every( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): boolean; + + /** + * @see _.every + */ + every( + predicate?: string|any[] + ): boolean; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.every + */ + every( + predicate?: ListIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: string|any[] + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.every + */ + every( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: string|any[] + ): LoDashExplicitWrapper; + + /** + * @see _.every + */ + every( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + //_.filter + interface LoDashStatic { + /** + * Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The + * predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * 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 collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new filtered array. + */ + filter( + collection: List, + predicate?: ListIterator, + thisArg?: any + ): T[]; + + /** + * @see _.filter + */ + filter( + collection: Dictionary, + predicate?: DictionaryIterator, + thisArg?: any + ): T[]; + + /** + * @see _.filter + */ + filter( + collection: string, + predicate?: StringIterator, + thisArg?: any + ): string[]; + + /** + * @see _.filter + */ + filter( + collection: List|Dictionary, + predicate: string, + thisArg?: any + ): T[]; + + /** + * @see _.filter + */ + filter( + collection: List|Dictionary, + predicate: W + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.filter + */ + filter( + predicate?: StringIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.filter + */ + filter( + predicate?: StringIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.filter + */ + filter( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.filter + */ + filter(predicate: W): LoDashExplicitArrayWrapper; + } + + //_.find + interface LoDashStatic { + /** + * Iterates over elements of collection, returning the first element predicate returns truthy for. + * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * 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 collection The collection to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the matched element, else undefined. + */ + find( + collection: List, + predicate?: ListIterator, + thisArg?: any + ): T; + + /** + * @see _.find + */ find( collection: Dictionary, - callback: ListIterator, - thisArg?: any): T; + predicate?: DictionaryIterator, + thisArg?: any + ): T; + + /** + * @see _.find + */ + find( + collection: List|Dictionary, + predicate?: string, + thisArg?: any + ): T; + + /** + * @see _.find + */ + find( + collection: List|Dictionary, + predicate?: TObject + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.find + */ + find( + predicate?: ListIterator, + thisArg?: any + ): T; + + /** + * @see _.find + */ + find( + predicate?: string, + thisArg?: any + ): T; + + /** + * @see _.find + */ + find( + predicate?: TObject + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.find + */ + find( + predicate?: ListIterator|DictionaryIterator, + thisArg?: any + ): TResult; + + /** + * @see _.find + */ + find( + predicate?: string, + thisArg?: any + ): TResult; + + /** + * @see _.find + */ + find( + predicate?: TObject + ): TResult; + } + + //_.findLast + interface LoDashStatic { + /** + * This method is like _.find except that it iterates over elements of a collection from + * right to left. + * @param collection Searches for a value in this list. + * @param callback The function called per iteration. + * @param thisArg The this binding of callback. + * @return The found element, else undefined. + **/ + findLast( + collection: Array, + callback: ListIterator, + thisArg?: any): T; + + /** + * @see _.find + **/ + findLast( + collection: List, + callback: ListIterator, + thisArg?: any): T; + + /** + * @see _.find + **/ + findLast( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T; + + /** + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: Array, + whereValue: W): T; + + /** + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: List, + whereValue: W): T; + + /** + * @see _.find + * @param _.pluck style callback + **/ + findLast( + collection: Dictionary, + whereValue: W): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: Array, + pluckValue: string): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: List, + pluckValue: string): T; + + /** + * @see _.find + * @param _.where style callback + **/ + findLast( + collection: Dictionary, + pluckValue: string): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.findLast + */ + findLast( + callback: ListIterator, + thisArg?: any): T; + /** + * @see _.findLast + * @param _.where style callback + */ + findLast( + whereValue: W): T; + + /** + * @see _.findLast + * @param _.where style callback + */ + findLast( + pluckValue: string): T; + } + + //_.forEach + interface LoDashStatic { + /** + * Iterates over elements of collection invoking iteratee for each element. The iteratee is bound to thisArg + * and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early by explicitly returning false. + * + * Note: As with other "Collections" methods, objects with a "length" property are iterated like arrays. To + * avoid this behavior _.forIn or _.forOwn may be used for object iteration. + * + * @alias _.each + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + */ + forEach( + collection: T[], + iteratee?: ListIterator, + thisArg?: any + ): T[]; + + /** + * @see _.forEach + */ + forEach( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): List; + + /** + * @see _.forEach + */ + forEach( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + + /** + * @see _.forEach + */ + forEach( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator, + thisArg?: any + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator, + thisArg?: any + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEach + */ + forEach( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper; + } + + //_.forEachRight + interface LoDashStatic { + /** + * This method is like _.forEach except that it iterates over elements of collection from right to left. + * + * @alias _.eachRight + * + * @param collection The collection to iterate over. + * @param iteratee The function called per iteration. + * @param thisArg The this binding of callback. + */ + forEachRight( + collection: T[], + iteratee?: ListIterator, + thisArg?: any + ): T[]; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): List; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + + /** + * @see _.forEachRight + */ + forEachRight( + collection: T, + iteratee?: ObjectIterator, + thisArgs?: any + ): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator, + thisArg?: any + ): LoDashImplicitWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator, + thisArg?: any + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.forEachRight + */ + forEachRight( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper; + } + + //_.groupBy + interface LoDashStatic { + /** + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is an array of the elements responsible for generating the + * key. The iteratee is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * 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 collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + groupBy( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: string, + thisArg?: TValue + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: string, + thisArg?: any + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: TWhere + ): Dictionary; + + /** + * @see _.groupBy + */ + groupBy( + collection: List|Dictionary, + iteratee?: Object + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string, + thisArg?: TValue + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string, + thisArg?: TValue + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: Object + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string, + thisArg?: TValue + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string, + thisArg?: TValue + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: TWhere + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.groupBy + */ + groupBy( + iteratee?: Object + ): LoDashExplicitObjectWrapper>; + } + + //_.includes + interface LoDashStatic { + /** + * Checks if target is in collection using SameValueZero for equality comparisons. If fromIndex is negative, + * it’s used as the offset from the end of collection. + * + * @param collection The collection to search. + * @param target The value to search for. + * @param fromIndex The index to search from. + * @return True if the target element is found, else false. + */ + includes( + collection: List|Dictionary, + target: T, + fromIndex?: number + ): boolean; + + /** + * @see _.includes + */ + includes( + collection: string, + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.includes + */ + includes( + target: T, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.includes + */ + includes( + target: TValue, + fromIndex?: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.includes + */ + includes( + target: string, + fromIndex?: number + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.includes + */ + includes( + target: T, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.includes + */ + includes( + target: TValue, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.includes + */ + includes( + target: string, + fromIndex?: number + ): LoDashExplicitWrapper; + } + + //_.keyBy + interface LoDashStatic { + /** + * Creates an object composed of keys generated from the results of running each element of collection through + * iteratee. The corresponding value of each key is the last element responsible for generating the key. The + * iteratee function is bound to thisArg and invoked with three arguments: + * (value, index|key, collection). + * + * 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 collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the composed aggregate object. + */ + keyBy( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: string, + thisArg?: any + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: W + ): Dictionary; + + /** + * @see _.keyBy + */ + keyBy( + collection: List|NumericDictionary|Dictionary, + iteratee?: Object + ): Dictionary; + } + + interface LoDashImplicitWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: Object + ): LoDashImplicitObjectWrapper>; + } + + interface LoDashExplicitWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.keyBy + */ + keyBy( + iteratee?: ListIterator|NumericDictionaryIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: W + ): LoDashExplicitObjectWrapper>; + + /** + * @see _.keyBy + */ + keyBy( + iteratee?: Object + ): LoDashExplicitObjectWrapper>; + } + + //_.invokeMap + interface LoDashStatic { + /** + * Invokes the method named by methodName on each element in the collection returning + * an array of the results of each invoked method. Additional arguments will be provided + * to each invoked method. If methodName is a function it will be invoked for, and this + * bound to, each element in the collection. + * @param collection The collection to iterate over. + * @param methodName The name of the method to invoke. + * @param args Arguments to invoke the method with. + **/ + invokeMap( + collection: TValue[], + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary, + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: {}[], + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary<{}>, + methodName: string, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: TValue[], + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary, + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: {}[], + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + + /** + * @see _.invokeMap + **/ + invokeMap( + collection: Dictionary<{}>, + method: (...args: any[]) => TResult, + ...args: any[]): TResult[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashImplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashImplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashExplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.invokeMap + **/ + invokeMap( + methodName: string, + ...args: any[]): LoDashExplicitArrayWrapper; + + /** + * @see _.invokeMap + **/ + invokeMap( + method: (...args: any[]) => TResult, + ...args: any[]): LoDashExplicitArrayWrapper; + } + + //_.map + interface LoDashStatic { + /** + * Creates an array of values by running each element in collection through iteratee. The iteratee is bound to + * thisArg and invoked with three arguments: (value, index|key, collection). + * + * 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. + * + * Many lodash methods are guarded to work as iteratees for methods like _.every, _.filter, _.map, _.mapValues, + * _.reject, and _.some. + * + * The guarded methods are: + * ary, callback, chunk, clone, create, curry, curryRight, drop, dropRight, every, fill, flatten, invert, max, + * min, parseInt, slice, sortBy, take, takeRight, template, trim, trimLeft, trimRight, trunc, random, range, + * sample, some, sum, uniq, and words + * + * @param collection The collection to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the new mapped array. + */ + map( + collection: List, + iteratee?: ListIterator, + thisArg?: any + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): TResult[]; + + map( + collection: NumericDictionary, + iteratee?: NumericDictionaryIterator, + thisArg?: any + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: List|Dictionary|NumericDictionary, + iteratee?: string + ): TResult[]; + + /** + * @see _.map + */ + map( + collection: List|Dictionary|NumericDictionary, + iteratee?: TObject + ): boolean[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashImplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.map + */ + map( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: string + ): LoDashExplicitArrayWrapper; + + /** + * @see _.map + */ + map( + iteratee?: TObject + ): LoDashExplicitArrayWrapper; + } + + //_.partition + interface LoDashStatic { + /** + * Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, + * while the second of which contains elements predicate returns falsey for. + * The predicate is bound to thisArg and invoked with three arguments: (value, index|key, collection). + * + * 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 collection The collection to iterate over. + * @param callback The function called per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the array of grouped elements. + **/ + partition( + collection: List, + callback: ListIterator, + thisArg?: any): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + callback: DictionaryIterator, + thisArg?: any): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + whereValue: W): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + whereValue: W): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + path: string, + srcValue: any): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + path: string, + srcValue: any): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: List, + pluckValue: string): T[][]; + + /** + * @see _.partition + **/ + partition( + collection: Dictionary, + pluckValue: string): T[][]; + } + + interface LoDashImplicitStringWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator, + thisArg?: any): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator, + thisArg?: any): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + whereValue: W): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + path: string, + srcValue: any): LoDashImplicitArrayWrapper; + /** + * @see _.partition + */ + partition( + pluckValue: string): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.partition + */ + partition( + callback: ListIterator, + thisArg?: any): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + callback: DictionaryIterator, + thisArg?: any): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + path: string, + srcValue: any): LoDashImplicitArrayWrapper; + + /** + * @see _.partition + */ + partition( + pluckValue: string): LoDashImplicitArrayWrapper; + } + + //_.reduce + interface LoDashStatic { + /** + * Reduces a collection to a value which is the accumulated result of running each + * element in the collection through the callback, where each successive callback execution + * consumes the return value of the previous execution. If accumulator is not provided the + * first element of the collection will be used as the initial accumulator value. The callback + * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator Initial value of the accumulator. + * @param thisArg The this binding of callback. + * @return Returns the accumulated value. + **/ + reduce( + collection: Array, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: List, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: NumericDictionary, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Array, + callback: MemoIterator, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: List, + callback: MemoIterator, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: Dictionary, + callback: MemoIterator, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + collection: NumericDictionary, + callback: MemoIterator, + thisArg?: any): TResult; + + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + thisArg?: any): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduce + **/ + reduce( + callback: MemoIterator, + thisArg?: any): TResult; + } + + //_.reduceRight + interface LoDashStatic { + /** + * This method is like _.reduce except that it iterates over elements of a collection from + * right to left. + * @param collection The collection to iterate over. + * @param callback The function called per iteration. + * @param accumulator Initial value of the accumulator. + * @param thisArg The this binding of callback. + * @return The accumulated value. + **/ + reduceRight( + collection: Array, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: List, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Dictionary, + callback: MemoIterator, + accumulator: TResult, + thisArg?: any): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Array, + callback: MemoIterator, + thisArg?: any): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: List, + callback: MemoIterator, + thisArg?: any): TResult; + + /** + * @see _.reduceRight + **/ + reduceRight( + collection: Dictionary, + callback: MemoIterator, + thisArg?: any): TResult; + } + + //_.reject + interface LoDashStatic { + /** + * The opposite of _.filter; this method returns the elements of collection that predicate does not return + * truthy for. + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the new filtered array. + */ + reject( + collection: List, + predicate?: ListIterator, + thisArg?: any + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: Dictionary, + predicate?: DictionaryIterator, + thisArg?: any + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: string, + predicate?: StringIterator, + thisArg?: any + ): string[]; + + /** + * @see _.reject + */ + reject( + collection: List|Dictionary, + predicate: string, + thisArg?: any + ): T[]; + + /** + * @see _.reject + */ + reject( + collection: List|Dictionary, + predicate: W + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.reject + */ + reject( + predicate?: StringIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string, + thisArg?: any + ): LoDashImplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.reject + */ + reject( + predicate?: StringIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.reject + */ + reject( + predicate: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject( + predicate: string, + thisArg?: any + ): LoDashExplicitArrayWrapper; + + /** + * @see _.reject + */ + reject(predicate: W): LoDashExplicitArrayWrapper; + } + + //_.sample + interface LoDashStatic { + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + sample(collection: Array): T; + + /** + * @see _.sample + **/ + sample(collection: List): T; + + /** + * @see _.sample + **/ + sample(collection: Dictionary): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sample + **/ + sample(): LoDashImplicitWrapper; + } + + //_.sampleSize + interface LoDashStatic { + /** + * Gets `n` random elements from `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=0] The number of elements to sample. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3, 4], 2); + * // => [3, 1] + */ + sampleSize(collection: Array, n: number): T[]; + + /** + * @see _.sampleSize + **/ + sampleSize(collection: List, n: number): T[]; + + /** + * @see _.sampleSize + **/ + sampleSize(collection: Dictionary, n: number): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sampleSize + **/ + sampleSize(n: number): LoDashImplicitArrayWrapper; + + /** + * @see _.sampleSize + **/ + sampleSize(): LoDashImplicitWrapper; + } + + //_.shuffle + interface LoDashStatic { + /** + * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. + * + * @param collection The collection to shuffle. + * @return Returns the new shuffled array. + */ + shuffle(collection: List|Dictionary): T[]; + + /** + * @see _.shuffle + */ + shuffle(collection: string): string[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.shuffle + */ + shuffle(): LoDashExplicitArrayWrapper; + } + + //_.size + interface LoDashStatic { + /** + * Gets the size of collection by returning its length for array-like values or the number of own enumerable + * properties for objects. + * + * @param collection The collection to inspect. + * @return Returns the size of collection. + */ + size(collection: List|Dictionary): number; + + /** + * @see _.size + */ + size(collection: string): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.size + */ + size(): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.size + */ + size(): LoDashExplicitWrapper; + } + + //_.some + interface LoDashStatic { + /** + * Checks if predicate returns truthy for any element of collection. Iteration is stopped once predicate + * returns truthy. The predicate is invoked with three arguments: (value, index|key, collection). + * + * @param collection The collection to iterate over. + * @param predicate The function invoked per iteration. + * @return Returns true if any element passes the predicate check, else false. + */ + some( + collection: List, + predicate?: ListIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: Dictionary, + predicate?: DictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: NumericDictionary, + predicate?: NumericDictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + collection: List|Dictionary|NumericDictionary, + predicate?: string|any[] + ): boolean; + + /** + * @see _.some + */ + some( + collection: List|Dictionary|NumericDictionary, + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|NumericDictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: string|any[] + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: string|any[] + ): boolean; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): boolean; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: string|any[] + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.some + */ + some( + predicate?: ListIterator|DictionaryIterator|NumericDictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: string|any[] + ): LoDashExplicitWrapper; + + /** + * @see _.some + */ + some( + predicate?: TObject + ): LoDashExplicitWrapper; + } + + //_.sortBy + interface LoDashStatic { + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]] + * The iteratees to sort by, specified individually or in arrays. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, function(o) { return o.user; }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.sortBy(users, 'user', function(o) { + * return Math.floor(o.age / 10); + * }); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + sortBy( + collection: List, + iteratee?: ListIterator + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary, + iteratee: string + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary, + whereValue: W + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: List|Dictionary + ): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: (Array|List), + iteratees: (ListIterator|string|Object)[]): T[]; + + /** + * @see _.sortBy + */ + sortBy( + collection: (Array|List), + ...iteratees: (ListIterator|Object|string)[]): T[]; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(...iteratees: (ListIterator|Object|string)[]): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + **/ + sortBy(iteratees: (ListIterator|string|Object)[]): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashImplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sortBy + */ + sortBy( + iteratee?: ListIterator|DictionaryIterator + ): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(iteratee: string): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(whereValue: W): LoDashExplicitArrayWrapper; + + /** + * @see _.sortBy + */ + sortBy(): LoDashExplicitArrayWrapper; + } + + //_.orderBy + interface LoDashStatic { + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} [iteratees=[_.identity]] The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + orderBy( + collection: List, + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: List, + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: NumericDictionary, + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: NumericDictionary, + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: Dictionary, + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + + /** + * @see _.orderBy + */ + orderBy( + collection: Dictionary, + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|(ListIterator|string)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|(ListIterator|string)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|W|(ListIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: ListIterator|string|Object|(ListIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|W|(NumericDictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: NumericDictionaryIterator|string|Object|(NumericDictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|W|(DictionaryIterator|string|W)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + + /** + * @see _.orderBy + */ + orderBy( + iteratees: DictionaryIterator|string|Object|(DictionaryIterator|string|Object)[], + orders?: boolean|string|(boolean|string)[] + ): LoDashExplicitArrayWrapper; + } + + /******** + * Date * + ********/ + + //_.now + interface LoDashStatic { + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @return The number of milliseconds. + */ + now(): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.now + */ + now(): number; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.now + */ + now(): LoDashExplicitWrapper; + } + + /************* + * Functions * + *************/ + + //_.after + interface LoDashStatic { + /** + * The opposite of _.before; this method creates a function that invokes func once it’s called n or more times. + * + * @param n The number of calls before func is invoked. + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + after( + n: number, + func: TFunc + ): TFunc; + } + + interface LoDashImplicitWrapper { + /** + * @see _.after + **/ + after(func: TFunc): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.after + **/ + after(func: TFunc): LoDashExplicitObjectWrapper; + } + + //_.ary + interface LoDashStatic { + /** + * Creates a function that accepts up to n arguments ignoring any additional arguments. + * + * @param func The function to cap arguments for. + * @param n The arity cap. + * @returns Returns the new function. + */ + ary( + func: Function, + n?: number + ): TResult; + + ary( + func: T, + n?: number + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.ary + */ + ary(n?: number): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.ary + */ + ary(n?: number): LoDashExplicitObjectWrapper; + } + + //_.before + interface LoDashStatic { + /** + * Creates a function that invokes func, with the this binding and arguments of the created function, while + * it’s called less than n times. Subsequent calls to the created function return the result of the last func + * invocation. + * + * @param n The number of calls at which func is no longer invoked. + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + before( + n: number, + func: TFunc + ): TFunc; + } + + interface LoDashImplicitWrapper { + /** + * @see _.before + **/ + before(func: TFunc): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.before + **/ + before(func: TFunc): LoDashExplicitObjectWrapper; + } + + //_.bind + interface FunctionBind { + placeholder: any; + + ( + func: T, + thisArg: any, + ...partials: any[] + ): TResult; + + ( + func: Function, + thisArg: any, + ...partials: any[] + ): TResult; + } + + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of thisArg and prepends any additional _.bind + * arguments to those provided to the bound function. + * + * The _.bind.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for + * partially applied arguments. + * + * Note: Unlike native Function#bind this method does not set the "length" property of bound functions. + * + * @param func The function to bind. + * @param thisArg The this binding of func. + * @param partials The arguments to be partially applied. + * @return Returns the new bound function. + */ + bind: FunctionBind; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bind + */ + bind( + thisArg: any, + ...partials: any[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bind + */ + bind( + thisArg: any, + ...partials: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.bindAll + interface LoDashStatic { + /** + * Binds methods of an object to the object itself, overwriting the existing method. Method names may be + * specified as individual arguments or as arrays of method names. If no method names are provided all + * enumerable function properties, own and inherited, of object are bound. + * + * Note: This method does not set the "length" property of bound functions. + * + * @param object The object to bind and assign the bound methods to. + * @param methodNames The object method names to bind, specified as individual method names or arrays of + * method names. + * @return Returns object. + */ + bindAll( + object: T, + ...methodNames: (string|string[])[] + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bindAll + */ + bindAll(...methodNames: (string|string[])[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bindAll + */ + bindAll(...methodNames: (string|string[])[]): LoDashExplicitObjectWrapper; + } + + //_.bindKey + interface FunctionBindKey { + placeholder: any; + + ( + object: T, + key: any, + ...partials: any[] + ): TResult; + + ( + object: Object, + key: any, + ...partials: any[] + ): TResult; + } + + interface LoDashStatic { + /** + * Creates a function that invokes the method at object[key] and prepends any additional _.bindKey arguments + * to those provided to the bound function. + * + * This method differs from _.bind by allowing bound functions to reference methods that may be redefined + * or don’t yet exist. See Peter Michaux’s article for more details. + * + * The _.bindKey.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder + * for partially applied arguments. + * + * @param object The object the method belongs to. + * @param key The key of the method. + * @param partials The arguments to be partially applied. + * @return Returns the new bound function. + */ + bindKey: FunctionBindKey; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.bindKey + */ + bindKey( + key: any, + ...partials: any[] + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.bindKey + */ + bindKey( + key: any, + ...partials: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.createCallback + interface LoDashStatic { + /** + * Produces a callback bound to an optional thisArg. If func is a property name the created + * callback will return the property value for a given element. If func is an object the created + * callback will return true for elements that contain the equivalent object properties, + * otherwise it will return false. + * @param func The value to convert to a callback. + * @param thisArg The this binding of the created callback. + * @param argCount The number of arguments the callback accepts. + * @return A callback function. + **/ + createCallback( + func: string, + thisArg?: any, + argCount?: number): () => any; + + /** + * @see _.createCallback + **/ + createCallback( + func: Dictionary, + thisArg?: any, + argCount?: number): () => boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.createCallback + **/ + createCallback( + thisArg?: any, + argCount?: number): LoDashImplicitObjectWrapper<() => any>; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.createCallback + **/ + createCallback( + thisArg?: any, + argCount?: number): LoDashImplicitObjectWrapper<() => any>; + } + + //_.curry + interface LoDashStatic { + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1) => R): + CurriedFunction1; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2) => R): + CurriedFunction2; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3) => R): + CurriedFunction3; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): + CurriedFunction4; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): + CurriedFunction5; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @param arity The arity of func. + * @return Returns the new curried function. + */ + curry( + func: Function, + arity?: number): TResult; + } + + interface CurriedFunction1 { + (): CurriedFunction1; + (t1: T1): R; + } + + interface CurriedFunction2 { + (): CurriedFunction2; + (t1: T1): CurriedFunction1; + (t1: T1, t2: T2): R; + } + + interface CurriedFunction3 { + (): CurriedFunction3; + (t1: T1): CurriedFunction2; + (t1: T1, t2: T2): CurriedFunction1; + (t1: T1, t2: T2, t3: T3): R; + } + + interface CurriedFunction4 { + (): CurriedFunction4; + (t1: T1): CurriedFunction3; + (t1: T1, t2: T2): CurriedFunction2; + (t1: T1, t2: T2, t3: T3): CurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: T4): R; + } + + interface CurriedFunction5 { + (): CurriedFunction5; + (t1: T1): CurriedFunction4; + (t1: T1, t2: T2): CurriedFunction3; + (t1: T1, t2: T2, t3: T3): CurriedFunction2; + (t1: T1, t2: T2, t3: T3, t4: T4): CurriedFunction1; + (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): R; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.curry + **/ + curry(arity?: number): LoDashImplicitObjectWrapper; + } + + //_.curryRight + interface LoDashStatic { + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1) => R): + CurriedFunction1; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2) => R): + CurriedFunction2; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3) => R): + CurriedFunction3; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): + CurriedFunction4; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @return Returns the new curried function. + */ + curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): + CurriedFunction5; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @param arity The arity of func. + * @return Returns the new curried function. + */ + curryRight( + func: Function, + arity?: number): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.curryRight + **/ + curryRight(arity?: number): LoDashImplicitObjectWrapper; + } + + //_.debounce + interface DebounceSettings { + /** + * Specify invoking on the leading edge of the timeout. + */ + leading?: boolean; + + /** + * The maximum time func is allowed to be delayed before it’s invoked. + */ + maxWait?: number; + + /** + * Specify invoking on the trailing edge of the timeout. + */ + trailing?: boolean; + } + + interface LoDashStatic { + /** + * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since + * the last time the debounced function was invoked. The debounced function comes with a cancel method to + * cancel delayed invocations. Provide an options object to indicate that func should be invoked on the + * leading and/or trailing edge of the wait timeout. Subsequent calls to the debounced function return the + * result of the last func invocation. + * + * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only + * if the the debounced function is invoked more than once during the wait timeout. + * + * See David Corbacho’s article for details over the differences between _.debounce and _.throttle. + * + * @param func The function to debounce. + * @param wait The number of milliseconds to delay. + * @param options The options object. + * @param options.leading Specify invoking on the leading edge of the timeout. + * @param options.maxWait The maximum time func is allowed to be delayed before it’s invoked. + * @param options.trailing Specify invoking on the trailing edge of the timeout. + * @return Returns the new debounced function. + */ + debounce( + func: T, + wait?: number, + options?: DebounceSettings + ): T & Cancelable; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.debounce + */ + debounce( + wait?: number, + options?: DebounceSettings + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.debounce + */ + debounce( + wait?: number, + options?: DebounceSettings + ): LoDashExplicitObjectWrapper; + } + + //_.defer + interface LoDashStatic { + /** + * Defers invoking the func until the current call stack has cleared. Any additional arguments are provided to + * func when it’s invoked. + * + * @param func The function to defer. + * @param args The arguments to invoke the function with. + * @return Returns the timer id. + */ + defer( + func: T, + ...args: any[] + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defer + */ + defer(...args: any[]): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.defer + */ + defer(...args: any[]): LoDashExplicitWrapper; + } + + //_.delay + interface LoDashStatic { + /** + * Invokes func after wait milliseconds. Any additional arguments are provided to func when it’s invoked. + * + * @param func The function to delay. + * @param wait The number of milliseconds to delay invocation. + * @param args The arguments to invoke the function with. + * @return Returns the timer id. + */ + delay( + func: T, + wait: number, + ...args: any[] + ): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.delay + */ + delay( + wait: number, + ...args: any[] + ): LoDashImplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.delay + */ + delay( + wait: number, + ...args: any[] + ): LoDashExplicitWrapper; + } + + interface LoDashStatic { + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + flip(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flip + */ + flip(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flip + */ + flip(): LoDashExplicitObjectWrapper; + } + + //_.flow + interface LoDashStatic { + /** + * Creates a function that returns the result of invoking the provided functions with the this binding of the + * created function, where each successive invocation is supplied the return value of the previous. + * + * @param funcs Functions to invoke. + * @return Returns the new function. + */ + flow(...funcs: Function[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flow + */ + flow(...funcs: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flow + */ + flow(...funcs: Function[]): LoDashExplicitObjectWrapper; + } + + //_.flowRight + interface LoDashStatic { + /** + * This method is like _.flow except that it creates a function that invokes the provided functions from right + * to left. + * + * @param funcs Functions to invoke. + * @return Returns the new function. + */ + flowRight(...funcs: Function[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.flowRight + */ + flowRight(...funcs: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flowRight + */ + flowRight(...funcs: Function[]): LoDashExplicitObjectWrapper; + } + + + //_.memoize + interface MemoizedFunction extends Function { + cache: MapCache; + } + + interface LoDashStatic { + /** + * Creates a function that memoizes the result of func. If resolver is provided it determines the cache key for + * storing the result based on the arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the cache key. The func is invoked with + * the this binding of the memoized function. + * @param func The function to have its output memoized. + * @param resolver The function to resolve the cache key. + * @return Returns the new memoizing function. + */ + memoize: { + (func: T, resolver?: Function): T & MemoizedFunction; + Cache: MapCache; + } + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.memoize + */ + memoize(resolver?: Function): LoDashImplicitObjectWrapper; + } + + //_.overArgs (was _.modArgs) + interface LoDashStatic { + /** + * Creates a function that runs each argument through a corresponding transform function. + * + * @param func The function to wrap. + * @param transforms The functions to transform arguments, specified as individual functions or arrays + * of functions. + * @return Returns the new function. + */ + overArgs( + func: T, + ...transforms: Function[] + ): TResult; + + /** + * @see _.overArgs + */ + overArgs( + func: T, + transforms: Function[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.overArgs + */ + overArgs(...transforms: Function[]): LoDashImplicitObjectWrapper; + + /** + * @see _.overArgs + */ + overArgs(transforms: Function[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.overArgs + */ + overArgs(...transforms: Function[]): LoDashExplicitObjectWrapper; + + /** + * @see _.overArgs + */ + overArgs(transforms: Function[]): LoDashExplicitObjectWrapper; + } + + //_.negate + interface LoDashStatic { + /** + * Creates a function that negates the result of the predicate func. The func predicate is invoked with + * the this binding and arguments of the created function. + * + * @param predicate The predicate to negate. + * @return Returns the new function. + */ + negate(predicate: T): (...args: any[]) => boolean; + + /** + * @see _.negate + */ + negate(predicate: T): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.negate + */ + negate(): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + + /** + * @see _.negate + */ + negate(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.negate + */ + negate(): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + + /** + * @see _.negate + */ + negate(): LoDashExplicitObjectWrapper; + } + + //_.once + interface LoDashStatic { + /** + * Creates a function that is restricted to invoking func once. Repeat calls to the function return the value + * of the first call. The func is invoked with the this binding and arguments of the created function. + * + * @param func The function to restrict. + * @return Returns the new restricted function. + */ + once(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.once + */ + once(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.once + */ + once(): LoDashExplicitObjectWrapper; + } + + //_.partial + interface LoDashStatic { + /** + * Creates a function that, when called, invokes func with any additional partial arguments + * prepended to those provided to the new function. This method is similar to _.bind except + * it does not alter the this binding. + * @param func The function to partially apply arguments to. + * @param args Arguments to be partially applied. + * @return The new partially applied function. + **/ + partial: Partial; + } + + type PH = LoDashStatic; + + interface Function0 { + (): R; + } + interface Function1 { + (t1: T1): R; + } + interface Function2 { + (t1: T1, t2: T2): R; + } + interface Function3 { + (t1: T1, t2: T2, t3: T3): R; + } + interface Function4 { + (t1: T1, t2: T2, t3: T3, t4: T4): R; + } + + interface Partial { + // arity 0 + (func: Function0): Function0; + // arity 1 + (func: Function1): Function1; + (func: Function1, arg1: T1): Function0; + // arity 2 + (func: Function2): Function2; + (func: Function2, arg1: T1): Function1< T2, R>; + (func: Function2, plc1: PH, arg2: T2): Function1; + (func: Function2, arg1: T1, arg2: T2): Function0< R>; + // arity 3 + (func: Function3): Function3; + (func: Function3, arg1: T1): Function2< T2, T3, R>; + (func: Function3, plc1: PH, arg2: T2): Function2; + (func: Function3, arg1: T1, arg2: T2): Function1< T3, R>; + (func: Function3, plc1: PH, plc2: PH, arg3: T3): Function2; + (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; + (func: Function3, plc1: PH, arg2: T2, arg3: T3): Function1; + (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; + // arity 4 + (func: Function4): Function4; + (func: Function4, arg1: T1): Function3< T2, T3, T4, R>; + (func: Function4, plc1: PH, arg2: T2): Function3; + (func: Function4, arg1: T1, arg2: T2): Function2< T3, T4, R>; + (func: Function4, plc1: PH, plc2: PH, arg3: T3): Function3; + (func: Function4, arg1: T1, plc2: PH, arg3: T3): Function2< T2, T4, R>; + (func: Function4, plc1: PH, arg2: T2, arg3: T3): Function2; + (func: Function4, arg1: T1, arg2: T2, arg3: T3): Function1< T4, R>; + (func: Function4, plc1: PH, plc2: PH, plc3: PH, arg4: T4): Function3; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; + (func: Function4, plc1: PH, arg2: T2, plc3: PH, arg4: T4): Function2; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; + (func: Function4, plc1: PH, plc2: PH, arg3: T3, arg4: T4): Function2; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; + (func: Function4, plc1: PH, arg2: T2, arg3: T3, arg4: T4): Function1; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; + // catch-all + (func: Function, ...args: any[]): Function; + } + + //_.partialRight + interface LoDashStatic { + /** + * This method is like _.partial except that partial arguments are appended to those provided + * to the new function. + * @param func The function to partially apply arguments to. + * @param args Arguments to be partially applied. + * @return The new partially applied function. + **/ + partialRight: PartialRight + } + + interface PartialRight { + // arity 0 + (func: Function0): Function0; + // arity 1 + (func: Function1): Function1; + (func: Function1, arg1: T1): Function0; + // arity 2 + (func: Function2): Function2; + (func: Function2, arg1: T1, plc2: PH): Function1< T2, R>; + (func: Function2, arg2: T2): Function1; + (func: Function2, arg1: T1, arg2: T2): Function0< R>; + // arity 3 + (func: Function3): Function3; + (func: Function3, arg1: T1, plc2: PH, plc3: PH): Function2< T2, T3, R>; + (func: Function3, arg2: T2, plc3: PH): Function2; + (func: Function3, arg1: T1, arg2: T2, plc3: PH): Function1< T3, R>; + (func: Function3, arg3: T3): Function2; + (func: Function3, arg1: T1, plc2: PH, arg3: T3): Function1< T2, R>; + (func: Function3, arg2: T2, arg3: T3): Function1; + (func: Function3, arg1: T1, arg2: T2, arg3: T3): Function0< R>; + // arity 4 + (func: Function4): Function4; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, plc4: PH): Function3< T2, T3, T4, R>; + (func: Function4, arg2: T2, plc3: PH, plc4: PH): Function3; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, plc4: PH): Function2< T3, T4, R>; + (func: Function4, arg3: T3, plc4: PH): Function3; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, plc4: PH): Function2< T2, T4, R>; + (func: Function4, arg2: T2, arg3: T3, plc4: PH): Function2; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, plc4: PH): Function1< T4, R>; + (func: Function4, arg4: T4): Function3; + (func: Function4, arg1: T1, plc2: PH, plc3: PH, arg4: T4): Function2< T2, T3, R>; + (func: Function4, arg2: T2, plc3: PH, arg4: T4): Function2; + (func: Function4, arg1: T1, arg2: T2, plc3: PH, arg4: T4): Function1< T3, R>; + (func: Function4, arg3: T3, arg4: T4): Function2; + (func: Function4, arg1: T1, plc2: PH, arg3: T3, arg4: T4): Function1< T2, R>; + (func: Function4, arg2: T2, arg3: T3, arg4: T4): Function1; + (func: Function4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): Function0< R>; + // catch-all + (func: Function, ...args: any[]): Function; + } + + //_.rearg + interface LoDashStatic { + /** + * Creates a function that invokes func with arguments arranged according to the specified indexes where the + * argument value at the first index is provided as the first argument, the argument value at the second index + * is provided as the second argument, and so on. + * @param func The function to rearrange arguments for. + * @param indexes The arranged argument indexes, specified as individual indexes or arrays of indexes. + * @return Returns the new function. + */ + rearg(func: Function, indexes: number[]): TResult; + + /** + * @see _.rearg + */ + rearg(func: Function, ...indexes: number[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.rearg + */ + rearg(indexes: number[]): LoDashImplicitObjectWrapper; + + /** + * @see _.rearg + */ + rearg(...indexes: number[]): LoDashImplicitObjectWrapper; + } + + //_.rest + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of the created function and arguments from start + * and beyond provided as an array. + * + * Note: This method is based on the rest parameter. + * + * @param func The function to apply a rest parameter to. + * @param start The start position of the rest parameter. + * @return Returns the new function. + */ + rest( + func: Function, + start?: number + ): TResult; + + /** + * @see _.rest + */ + rest( + func: TFunc, + start?: number + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.rest + */ + rest(start?: number): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.rest + */ + rest(start?: number): LoDashExplicitObjectWrapper; + } + + //_.spread + interface LoDashStatic { + /** + * Creates a function that invokes func with the this binding of the created function and an array of arguments + * much like Function#apply. + * + * Note: This method is based on the spread operator. + * + * @param func The function to spread arguments over. + * @return Returns the new function. + */ + spread(func: F): T; + + /** + * @see _.spread + */ + spread(func: Function): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.spread + */ + spread(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.spread + */ + spread(): LoDashExplicitObjectWrapper; + } + + //_.throttle + 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; + } + + interface LoDashStatic { + /** + * Creates a throttled function that only invokes func at most once per every wait milliseconds. The throttled + * function comes with a cancel method to cancel delayed invocations. Provide an options object to indicate + * that func should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls to + * the throttled function return the result of the last func call. + * + * Note: If leading and trailing options are true, func is invoked on the trailing edge of the timeout only if + * the the throttled function is invoked more than once during the wait timeout. + * + * @param func The function to throttle. + * @param wait The number of milliseconds to throttle invocations to. + * @param options The options object. + * @param options.leading Specify invoking on the leading edge of the timeout. + * @param options.trailing Specify invoking on the trailing edge of the timeout. + * @return Returns the new throttled function. + */ + throttle( + func: T, + wait?: number, + options?: ThrottleSettings + ): T & Cancelable; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.throttle + */ + throttle( + wait?: number, + options?: ThrottleSettings + ): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.throttle + */ + throttle( + wait?: number, + options?: ThrottleSettings + ): LoDashExplicitObjectWrapper; + } + + //_.unary + interface LoDashStatic { + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + unary(func: T): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.unary + */ + unary(): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.unary + */ + unary(): LoDashExplicitObjectWrapper; + } + + //_.wrap + interface LoDashStatic { + /** + * Creates a function that provides value to the wrapper function as its first argument. Any additional + * arguments provided to the function are appended to those provided to the wrapper function. The wrapper is + * invoked with the this binding of the created function. + * + * @param value The value to wrap. + * @param wrapper The wrapper function. + * @return Returns the new function. + */ + wrap( + value: V, + wrapper: W + ): R; + + /** + * @see _.wrap + */ + wrap( + value: V, + wrapper: Function + ): R; + + /** + * @see _.wrap + */ + wrap( + value: any, + wrapper: Function + ): R; + } + + interface LoDashImplicitWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashImplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.wrap + */ + wrap(wrapper: W): LoDashExplicitObjectWrapper; + + /** + * @see _.wrap + */ + wrap(wrapper: Function): LoDashExplicitObjectWrapper; + } + + /******** + * Lang * + ********/ + + //_.castArray + interface LoDashStatic { + /** + * Casts value as an array if it’s not one. + * + * @param value The value to inspect. + * @return Returns the cast array. + */ + castArray(value: T): T[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.castArray + */ + castArray(): LoDashExplicitArrayWrapper; + } + + //_.clone + interface LoDashStatic { + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + clone(value: T): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.clone + */ + clone(): T; + } + + interface LoDashImplicitArrayWrapper { + + /** + * @see _.clone + */ + clone(): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.clone + */ + clone(): T; + } + + //_.cloneDeep + interface LoDashStatic { + /** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ + cloneDeep(value: T): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(): T; + } + + //_.cloneWith + interface LoDashStatic { + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + clone( + value: T, + customizer: (value: any) => any): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.clone + */ + clone(customizer: (value: any) => any): T; + } + + interface LoDashImplicitArrayWrapper { + + /** + * @see _.clone + */ + clone(customizer: (value: any) => any): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.clone + */ + clone(customizer: (value: any) => any): T; + } + + //_.cloneDeepWith + interface LoDashStatic { + /** + * Creates a deep clone of value. If customizer is provided it’s invoked to produce the cloned values. If + * customizer returns undefined cloning is handled by the method instead. The customizer is bound to thisArg + * and invoked with up to three argument; (value [, index|key, object]). + * Note: This method is loosely based on the structured clone algorithm. The enumerable properties of arguments + * objects and objects created by constructors other than Object are cloned to plain Object objects. An empty + * object is returned for uncloneable values such as functions, DOM nodes, Maps, Sets, and WeakMaps. + * @param value The value to deep clone. + * @param customizer The function to customize cloning values. + * @param thisArg The this binding of customizer. + * @return Returns the deep cloned value. + */ + cloneDeep( + value: T, + customizer: (value: any) => any): T; + } + + interface LoDashImplicitWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(customizer: (value: any) => any): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(customizer: (value: any) => any): T[]; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.cloneDeep + */ + cloneDeep(customizer: (value: any) => any): T; + } + + //_.eq + interface LoDashStatic { + /** + * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + eq( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqual + */ + eq( + other: any + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqual + */ + eq( + other: any + ): LoDashExplicitWrapper; + } + + //_.gt + interface LoDashStatic { + /** + * Checks if value is greater than other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is greater than other, else false. + */ + gt( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.gt + */ + gt(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.gt + */ + gt(other: any): LoDashExplicitWrapper; + } + + //_.gte + interface LoDashStatic { + /** + * Checks if value is greater than or equal to other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is greater than or equal to other, else false. + */ + gte( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.gte + */ + gte(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.gte + */ + gte(other: any): LoDashExplicitWrapper; + } + + //_.isArguments + interface LoDashStatic { + /** + * Checks if value is classified as an arguments object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isArguments(value?: any): value is IArguments; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArguments + */ + isArguments(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArguments + */ + isArguments(): LoDashExplicitWrapper; + } + + //_.isArray + interface LoDashStatic { + /** + * Checks if value is classified as an Array object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isArray(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArray + */ + isArray(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArray + */ + isArray(): LoDashExplicitWrapper; + } + + //_.isArrayBuffer + interface LoDashStatic { + /** + * Checks if value is classified as an ArrayBuffer object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isArrayBuffer(value?: any): value is ArrayBuffer; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayBuffer + */ + isArrayBuffer(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayBuffer + */ + isArrayBuffer(): LoDashExplicitWrapper; + } + + //_.isArrayLike + interface LoDashStatic { + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + isArrayLike(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayLike + */ + isArrayLike(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayLike + */ + isArrayLike(): LoDashExplicitWrapper; + } + + //_.isArrayLikeObject + interface LoDashStatic { + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @type Function + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + isArrayLikeObject(value?: any): value is T[]; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isArrayLikeObject + */ + isArrayLikeObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isArrayLikeObject + */ + isArrayLikeObject(): LoDashExplicitWrapper; + } + + //_.isBoolean + interface LoDashStatic { + /** + * Checks if value is classified as a boolean primitive or object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isBoolean(value?: any): value is boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isBoolean + */ + isBoolean(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isBoolean + */ + isBoolean(): LoDashExplicitWrapper; + } + + //_.isDate + interface LoDashStatic { + /** + * Checks if value is classified as a Date object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isDate(value?: any): value is Date; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isDate + */ + isDate(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isDate + */ + isDate(): LoDashExplicitWrapper; + } + + //_.isElement + interface LoDashStatic { + /** + * Checks if value is a DOM element. + * + * @param value The value to check. + * @return Returns true if value is a DOM element, else false. + */ + isElement(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isElement + */ + isElement(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isElement + */ + isElement(): LoDashExplicitWrapper; + } + + //_.isEmpty + interface LoDashStatic { + /** + * Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string, or + * jQuery-like collection with a length greater than 0 or an object with own enumerable properties. + * + * @param value The value to inspect. + * @return Returns true if value is empty, else false. + */ + isEmpty(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEmpty + */ + isEmpty(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEmpty + */ + isEmpty(): LoDashExplicitWrapper; + } + + //_.isEqual + interface LoDashStatic { + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are **not** supported. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ + isEqual( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqual + */ + isEqual( + other: any + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqual + */ + isEqual( + other: any + ): LoDashExplicitWrapper; + } + + // _.isEqualWith + interface IsEqualCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * This method is like `_.isEqual` except that it accepts `customizer` which is + * invoked to compare values. If `customizer` returns `undefined` comparisons are + * handled by the method instead. The `customizer` is invoked with up to seven arguments: + * (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + isEqualWith( + value: any, + other: any, + customizer: IsEqualCustomizer + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isEqualWith + */ + isEqualWith( + other: any, + customizer: IsEqualCustomizer + ): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isEqualWith + */ + isEqualWith( + other: any, + customizer: IsEqualCustomizer + ): LoDashExplicitWrapper; + } + + //_.isError + interface LoDashStatic { + /** + * Checks if value is an Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, or URIError + * object. + * + * @param value The value to check. + * @return Returns true if value is an error object, else false. + */ + isError(value: any): value is Error; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isError + */ + isError(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isError + */ + isError(): LoDashExplicitWrapper; + } + + //_.isFinite + interface LoDashStatic { + /** + * Checks if value is a finite primitive number. + * + * Note: This method is based on Number.isFinite. + * + * @param value The value to check. + * @return Returns true if value is a finite number, else false. + */ + isFinite(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isFinite + */ + isFinite(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isFinite + */ + isFinite(): LoDashExplicitWrapper; + } + + //_.isFunction + interface LoDashStatic { + /** + * Checks if value is classified as a Function object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isFunction(value?: any): value is Function; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isFunction + */ + isFunction(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isFunction + */ + isFunction(): LoDashExplicitWrapper; + } + + //_.isInteger + interface LoDashStatic { + /** + * Checks if `value` is an integer. + * + * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ + isInteger(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isInteger + */ + isInteger(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isInteger + */ + isInteger(): LoDashExplicitWrapper; + } + + //_.isLength + interface LoDashStatic { + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + isLength(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isLength + */ + isLength(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isLength + */ + isLength(): LoDashExplicitWrapper; + } + + //_.isMatch + interface isMatchCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * Performs a deep comparison between `object` and `source` to determine if + * `object` contains equivalent property values. + * + * **Note:** This method supports comparing the same values as `_.isEqual`. + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.isMatch(object, { 'age': 40 }); + * // => true + * + * _.isMatch(object, { 'age': 36 }); + * // => false + */ + isMatch(object: Object, source: Object): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.isMatch + */ + isMatch(source: Object): boolean; + } + + //_.isMatchWith + interface isMatchWithCustomizer { + (value: any, other: any, indexOrKey?: number|string): boolean; + } + + interface LoDashStatic { + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined` comparisons + * are handled by the method instead. The `customizer` is invoked with three + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + isMatchWith(object: Object, source: Object, customizer: isMatchWithCustomizer): boolean; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.isMatchWith + */ + isMatchWith(source: Object, customizer: isMatchWithCustomizer): boolean; + } + + //_.isNaN + interface LoDashStatic { + /** + * Checks if value is NaN. + * + * Note: This method is not the same as isNaN which returns true for undefined and other non-numeric values. + * + * @param value The value to check. + * @return Returns true if value is NaN, else false. + */ + isNaN(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.isNaN + */ + isNaN(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.isNaN + */ + isNaN(): LoDashExplicitWrapper; + } + + //_.isNative + interface LoDashStatic { + /** + * Checks if value is a native function. + * @param value The value to check. + * + * @retrun Returns true if value is a native function, else false. + */ + isNative(value: any): value is Function; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNative + */ + isNative(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNative + */ + isNative(): LoDashExplicitWrapper; + } + + //_.isNil + interface LoDashStatic { + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + isNil(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNil + */ + isNil(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNil + */ + isNil(): LoDashExplicitWrapper; + } + + //_.isNull + interface LoDashStatic { + /** + * Checks if value is null. + * + * @param value The value to check. + * @return Returns true if value is null, else false. + */ + isNull(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNull + */ + isNull(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNull + */ + isNull(): LoDashExplicitWrapper; + } + + //_.isNumber + interface LoDashStatic { + /** + * Checks if value is classified as a Number primitive or object. + * + * Note: To exclude Infinity, -Infinity, and NaN, which are classified as numbers, use the _.isFinite method. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isNumber(value?: any): value is number; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isNumber + */ + isNumber(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isNumber + */ + isNumber(): LoDashExplicitWrapper; + } + + //_.isObject + interface LoDashStatic { + /** + * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), + * and new String('')) + * + * @param value The value to check. + * @return Returns true if value is an object, else false. + */ + isObject(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isObject + */ + isObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isObject + */ + isObject(): LoDashExplicitWrapper; + } + + //_.isObjectLike + interface LoDashStatic { + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + isObjectLike(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isObjectLike + */ + isObjectLike(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isObjectLike + */ + isObjectLike(): LoDashExplicitWrapper; + } + + //_.isPlainObject + interface LoDashStatic { + /** + * Checks if value is a plain object, that is, an object created by the Object constructor or one with a + * [[Prototype]] of null. + * + * Note: This method assumes objects created by the Object constructor have no inherited enumerable properties. + * + * @param value The value to check. + * @return Returns true if value is a plain object, else false. + */ + isPlainObject(value?: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isPlainObject + */ + isPlainObject(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isPlainObject + */ + isPlainObject(): LoDashExplicitWrapper; + } + + //_.isRegExp + interface LoDashStatic { + /** + * Checks if value is classified as a RegExp object. + * @param value The value to check. + * + * @return Returns true if value is correctly classified, else false. + */ + isRegExp(value?: any): value is RegExp; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isRegExp + */ + isRegExp(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isRegExp + */ + isRegExp(): LoDashExplicitWrapper; + } + + //_.isSafeInteger + interface LoDashStatic { + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + isSafeInteger(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isSafeInteger + */ + isSafeInteger(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isSafeInteger + */ + isSafeInteger(): LoDashExplicitWrapper; + } + + //_.isString + interface LoDashStatic { + /** + * Checks if value is classified as a String primitive or object. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isString(value?: any): value is string; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isString + */ + isString(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isString + */ + isString(): LoDashExplicitWrapper; + } + + //_.isSymbol + interface LoDashStatic { + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + isSymbol(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isSymbol + */ + isSymbol(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isSymbol + */ + isSymbol(): LoDashExplicitWrapper; + } + + //_.isTypedArray + interface LoDashStatic { + /** + * Checks if value is classified as a typed array. + * + * @param value The value to check. + * @return Returns true if value is correctly classified, else false. + */ + isTypedArray(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isTypedArray + */ + isTypedArray(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isTypedArray + */ + isTypedArray(): LoDashExplicitWrapper; + } + + //_.isUndefined + interface LoDashStatic { + /** + * Checks if value is undefined. + * + * @param value The value to check. + * @return Returns true if value is undefined, else false. + */ + isUndefined(value: any): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * see _.isUndefined + */ + isUndefined(): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * see _.isUndefined + */ + isUndefined(): LoDashExplicitWrapper; + } + + //_.lt + interface LoDashStatic { + /** + * Checks if value is less than other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is less than other, else false. + */ + lt( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.lt + */ + lt(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.lt + */ + lt(other: any): LoDashExplicitWrapper; + } + + //_.lte + interface LoDashStatic { + /** + * Checks if value is less than or equal to other. + * + * @param value The value to compare. + * @param other The other value to compare. + * @return Returns true if value is less than or equal to other, else false. + */ + lte( + value: any, + other: any + ): boolean; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.lte + */ + lte(other: any): boolean; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.lte + */ + lte(other: any): LoDashExplicitWrapper; + } + + //_.toArray + interface LoDashStatic { + /** + * Converts value to an array. + * + * @param value The value to convert. + * @return Returns the converted array. + */ + toArray(value: List|Dictionary|NumericDictionary): T[]; + + /** + * @see _.toArray + */ + toArray(value: TValue): TResult[]; + + /** + * @see _.toArray + */ + toArray(value?: any): TResult[]; + } + + interface LoDashImplicitWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.toArray + */ + toArray(): LoDashExplicitArrayWrapper; + } + + //_.toPlainObject + interface LoDashStatic { + /** + * Converts value to a plain object flattening inherited enumerable properties of value to own properties + * of the plain object. + * + * @param value The value to convert. + * @return Returns the converted plain object. + */ + toPlainObject(value?: any): TResult; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toPlainObject + */ + toPlainObject(): LoDashImplicitObjectWrapper; + } + + //_.toInteger + interface LoDashStatic { + /** + * Converts `value` to an integer. + * + * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3'); + * // => 3 + */ + toInteger(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toInteger + */ + toInteger(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toInteger + */ + toInteger(): LoDashExplicitWrapper; + } + + //_.toLength + interface LoDashStatic { + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @return {number} Returns the converted integer. + * @example + * + * _.toLength(3); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3'); + * // => 3 + */ + toLength(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toLength + */ + toLength(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toLength + */ + toLength(): LoDashExplicitWrapper; + } + + //_.toNumber + interface LoDashStatic { + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3); + * // => 3 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3'); + * // => 3 + */ + toNumber(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toNumber + */ + toNumber(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toNumber + */ + toNumber(): LoDashExplicitWrapper; + } + + //_.toSafeInteger + interface LoDashStatic { + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3'); + * // => 3 + */ + toSafeInteger(value: any): number; + } + + interface LoDashImplicitWrapperBase { + /** + * @see _.toSafeInteger + */ + toSafeInteger(): LoDashImplicitWrapper; + } + + interface LoDashExplicitWrapperBase { + /** + * @see _.toSafeInteger + */ + toSafeInteger(): LoDashExplicitWrapper; + } + + //_.toString DUMMY + interface LoDashStatic { + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + toString(value: any): string; + } + + /******** + * Math * + ********/ + + //_.add + interface LoDashStatic { + /** + * Adds two numbers. + * + * @param augend The first number to add. + * @param addend The second number to add. + * @return Returns the sum. + */ + add( + augend: number, + addend: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.add + */ + add(addend: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.add + */ + add(addend: number): LoDashExplicitWrapper; + } + + //_.ceil + interface LoDashStatic { + /** + * Calculates n rounded up to precision. + * + * @param n The number to round up. + * @param precision The precision to round up to. + * @return Returns the rounded up number. + */ + ceil( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.ceil + */ + ceil(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.ceil + */ + ceil(precision?: number): LoDashExplicitWrapper; + } + + //_.floor + interface LoDashStatic { + /** + * Calculates n rounded down to precision. + * + * @param n The number to round down. + * @param precision The precision to round down to. + * @return Returns the rounded down number. + */ + floor( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.floor + */ + floor(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.floor + */ + floor(precision?: number): LoDashExplicitWrapper; + } + + //_.max + interface LoDashStatic { + /** + * Computes the maximum value of `array`. If `array` is empty or falsey + * `undefined` is returned. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. + */ + max( + collection: List + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.max + */ + max(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.max + */ + max(): T; + } + + //_.maxBy + interface LoDashStatic { + /** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.a; }); + * // => { 'n': 2 } + * + * // using the `_.property` iteratee shorthand + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ + maxBy( + collection: List, + iteratee?: ListIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: List|Dictionary, + iteratee?: string + ): T; + + /** + * @see _.maxBy + */ + maxBy( + collection: List|Dictionary, + whereValue?: TObject + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.maxBy + */ + maxBy( + iteratee?: ListIterator + ): T; + + /** + * @see _.maxBy + */ + maxBy( + iteratee?: string + ): T; + + /** + * @see _.maxBy + */ + maxBy( + whereValue?: TObject + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.maxBy + */ + maxBy( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): T; + + /** + * @see _.maxBy + */ + maxBy( + iteratee?: string, + thisArg?: any + ): T; + + /** + * @see _.maxBy + */ + maxBy( + whereValue?: TObject + ): T; + } + + //_.mean + interface LoDashStatic { + /** + * Computes the mean of the values in `array`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. + * @example + * + * _.mean([4, 2, 8, 6]); + * // => 5 + */ + mean( + collection: List + ): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.mean + */ + mean(): number; + + /** + * @see _.mean + */ + mean(): number; + } + + //_.min + interface LoDashStatic { + /** + * Computes the minimum value of `array`. If `array` is empty or falsey + * `undefined` is returned. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. + */ + min( + collection: List + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.min + */ + min(): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.min + */ + min(): T; + } + + //_.minBy + interface LoDashStatic { + /** + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.minBy(objects, function(o) { return o.a; }); + * // => { 'n': 1 } + * + * // using the `_.property` iteratee shorthand + * _.minBy(objects, 'n'); + * // => { 'n': 1 } + */ + minBy( + collection: List, + iteratee?: ListIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: Dictionary, + iteratee?: DictionaryIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: List|Dictionary, + iteratee?: string + ): T; + + /** + * @see _.minBy + */ + minBy( + collection: List|Dictionary, + whereValue?: TObject + ): T; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.minBy + */ + minBy( + iteratee?: ListIterator + ): T; + + /** + * @see _.minBy + */ + minBy( + iteratee?: string + ): T; + + /** + * @see _.minBy + */ + minBy( + whereValue?: TObject + ): T; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.minBy + */ + minBy( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): T; + + /** + * @see _.minBy + */ + minBy( + iteratee?: string, + thisArg?: any + ): T; + + /** + * @see _.minBy + */ + minBy( + whereValue?: TObject + ): T; + } + + //_.round + interface LoDashStatic { + /** + * Calculates n rounded to precision. + * + * @param n The number to round. + * @param precision The precision to round to. + * @return Returns the rounded number. + */ + round( + n: number, + precision?: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.round + */ + round(precision?: number): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.round + */ + round(precision?: number): LoDashExplicitWrapper; + } + + //_.sum + interface LoDashStatic { + /** + * Computes the sum of the values in `array`. + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. + * @example + * + * _.sum([4, 2, 8, 6]); + * // => 20 + */ + sum(collection: List): number; + + /** + * @see _.sum + */ + sum(collection: List|Dictionary): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sum + */ + sum(): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sum + **/ + sum(): number; + + /** + * @see _.sum + */ + sum(): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + + /** + * @see _.sum + */ + sum(): LoDashExplicitWrapper; + } + + //_.sumBy + interface LoDashStatic { + /** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // using the `_.property` iteratee shorthand + * _.sumBy(objects, 'n'); + * // => 20 + */ + sumBy( + collection: List, + iteratee: ListIterator + ): number; + + /** + * @see _.sumBy + **/ + sumBy( + collection: Dictionary, + iteratee: DictionaryIterator + ): number; + + /** + * @see _.sumBy + */ + sumBy( + collection: List|Dictionary, + iteratee: string + ): number; + + /** + * @see _.sumBy + */ + sumBy(collection: List|Dictionary): number; + + /** + * @see _.sumBy + */ + sumBy(collection: List|Dictionary): number; + } + + interface LoDashImplicitArrayWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator + ): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): number; + + /** + * @see _.sumBy + */ + sumBy(): number; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.sumBy + **/ + sumBy( + iteratee: ListIterator|DictionaryIterator + ): number; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): number; + + /** + * @see _.sumBy + */ + sumBy(): number; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator + ): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(): LoDashExplicitWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.sumBy + */ + sumBy( + iteratee: ListIterator|DictionaryIterator + ): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(iteratee: string): LoDashExplicitWrapper; + + /** + * @see _.sumBy + */ + sumBy(): LoDashExplicitWrapper; + } + + /********** + * Number * + **********/ + + //_.subtract + interface LoDashStatic { + /** + * Subtract two numbers. + * + * @static + * @memberOf _ + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. + * @example + * + * _.subtract(6, 4); + * // => 2 + */ + subtract( + minuend: number, + subtrahend: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.subtract + */ + subtract( + subtrahend: number + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.subtract + */ + subtract( + subtrahend: number + ): LoDashExplicitWrapper; + } + + //_.clamp + interface LoDashStatic { + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + clamp( + number: number, + lower: number, + upper: number + ): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.clamp + */ + clamp( + lower: number, + upper: number + ): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.clamp + */ + clamp( + lower: number, + upper: number + ): LoDashExplicitWrapper; + } + + //_.inRange + interface LoDashStatic { + /** + * Checks if n is between start and up to but not including, end. If end is not specified it’s set to start + * with start then set to 0. + * + * @param n The number to check. + * @param start The start of the range. + * @param end The end of the range. + * @return Returns true if n is in the range, else false. + */ + inRange( + n: number, + start: number, + end: number + ): boolean; + + + /** + * @see _.inRange + */ + inRange( + n: number, + end: number + ): boolean; + } + + interface LoDashImplicitWrapper { + /** + * @see _.inRange + */ + inRange( + start: number, + end: number + ): boolean; + + /** + * @see _.inRange + */ + inRange(end: number): boolean; + } + + interface LoDashExplicitWrapper { + /** + * @see _.inRange + */ + inRange( + start: number, + end: number + ): LoDashExplicitWrapper; + + /** + * @see _.inRange + */ + inRange(end: number): LoDashExplicitWrapper; + } + + //_.random + interface LoDashStatic { + /** + * Produces a random number between min and max (inclusive). If only one argument is provided a number between + * 0 and the given number is returned. If floating is true, or either min or max are floats, a floating-point + * number is returned instead of an integer. + * + * @param min The minimum possible value. + * @param max The maximum possible value. + * @param floating Specify returning a floating-point number. + * @return Returns the random number. + */ + random( + min?: number, + max?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random( + min?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random(floating?: boolean): number; + } + + interface LoDashImplicitWrapper { + /** + * @see _.random + */ + random( + max?: number, + floating?: boolean + ): number; + + /** + * @see _.random + */ + random(floating?: boolean): number; + } + + interface LoDashExplicitWrapper { + /** + * @see _.random + */ + random( + max?: number, + floating?: boolean + ): LoDashExplicitWrapper; + + /** + * @see _.random + */ + random(floating?: boolean): LoDashExplicitWrapper; + } + + /********** + * Object * + **********/ + + //_.assign + interface LoDashStatic { + /** + * Assigns own enumerable properties of source objects to the destination + * object. Source objects are applied from left to right. Subsequent sources + * overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.c = 3; + * } + * + * function Bar() { + * this.e = 5; + * } + * + * Foo.prototype.d = 4; + * Bar.prototype.f = 6; + * + * _.assign({ 'a': 1 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3, 'e': 5 } + */ + assign( + object: TObject, + source: TSource + ): TResult; + + /** + * @see assign + */ + assign( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TResult; + + /** + * @see assign + */ + assign( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TResult; + + /** + * @see assign + */ + assign + ( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TResult; + + /** + * @see _.assign + */ + assign(object: TObject): TObject; + + /** + * @see _.assign + */ + assign( + object: TObject, ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assign + */ + assign( + source: TSource + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(): LoDashImplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assign + */ + assign( + source: TSource + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; + + /** + * @see assign + */ + assign( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(): LoDashExplicitObjectWrapper; + + /** + * @see _.assign + */ + assign(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignWith + interface AssignCustomizer { + (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; + } + + interface LoDashStatic { + /** + * This method is like `_.assign` except that it accepts `customizer` which + * is invoked to produce the assigned values. If `customizer` returns `undefined` + * assignment is handled by the method instead. The `customizer` is invoked + * with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + assignWith( + object: TObject, + source: TSource, + customizer: AssignCustomizer + ): TResult; + + /** + * @see assignWith + */ + assignWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): TResult; + + /** + * @see assignWith + */ + assignWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): TResult; + + /** + * @see assignWith + */ + assignWith + ( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): TResult; + + /** + * @see _.assignWith + */ + assignWith(object: TObject): TObject; + + /** + * @see _.assignWith + */ + assignWith( + object: TObject, ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignWith + */ + assignWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignWith + */ + assignWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignWith + */ + assignWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignWith + */ + assignWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignIn + interface LoDashStatic { + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * function Bar() { + * this.d = 4; + * } + * + * Foo.prototype.c = 3; + * Bar.prototype.e = 5; + * + * _.assignIn({ 'a': 1 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 } + */ + assignIn( + object: TObject, + source: TSource + ): TResult; + + /** + * @see assignIn + */ + assignIn( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TResult; + + /** + * @see assignIn + */ + assignIn( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TResult; + + /** + * @see assignIn + */ + assignIn + ( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TResult; + + /** + * @see _.assignIn + */ + assignIn(object: TObject): TObject; /** - * @see _.find - * @param _.pluck style callback - **/ - find( - collection: Array, - whereValue: W): T; + * @see _.assignIn + */ + assignIn( + object: TObject, ...otherArgs: any[] + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.find - * @param _.pluck style callback - **/ - find( - collection: List, - whereValue: W): T; + * @see _.assignIn + */ + assignIn( + source: TSource + ): LoDashImplicitObjectWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - find( - collection: Dictionary, - whereValue: W): T; + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; /** - * @see _.find - * @param _.where style callback - **/ - find( - collection: Array, - pluckValue: string): T; + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; /** - * @see _.find - * @param _.where style callback - **/ - find( - collection: List, - pluckValue: string): T; + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; /** - * @see _.find - * @param _.where style callback - **/ - find( - collection: Dictionary, - pluckValue: string): T; + * @see _.assignIn + */ + assignIn(): LoDashImplicitObjectWrapper; /** - * @see _.find - **/ - detect( - collection: Array, - callback: ListIterator, - thisArg?: any): T; + * @see _.assignIn + */ + assignIn(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.find - **/ - detect( - collection: List, - callback: ListIterator, - thisArg?: any): T; + * @see _.assignIn + */ + assignIn( + source: TSource + ): LoDashExplicitObjectWrapper; /** - * @see _.find - **/ - detect( - collection: Dictionary, - callback: ListIterator, - thisArg?: any): T; + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - detect( - collection: Array, - whereValue: W): T; + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - detect( - collection: List, - whereValue: W): T; + * @see assignIn + */ + assignIn( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashExplicitObjectWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - detect( - collection: Dictionary, - whereValue: W): T; + * @see _.assignIn + */ + assignIn(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignIn + */ + assignIn(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.assignInWith + interface AssignCustomizer { + (objectValue: any, sourceValue: any, key?: string, object?: {}, source?: {}): any; + } + + interface LoDashStatic { + /** + * This method is like `_.assignIn` except that it accepts `customizer` which + * is invoked to produce the assigned values. If `customizer` returns `undefined` + * assignment is handled by the method instead. The `customizer` is invoked + * with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + assignInWith( + object: TObject, + source: TSource, + customizer: AssignCustomizer + ): TResult; + + /** + * @see assignInWith + */ + assignInWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): TResult; + + /** + * @see assignInWith + */ + assignInWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): TResult; + + /** + * @see assignInWith + */ + assignInWith + ( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): TResult; + + /** + * @see _.assignInWith + */ + assignInWith(object: TObject): TObject; + + /** + * @see _.assignInWith + */ + assignInWith( + object: TObject, ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assignInWith + */ + assignInWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(): LoDashImplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.assignInWith + */ + assignInWith( + source: TSource, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see assignInWith + */ + assignInWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: AssignCustomizer + ): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(): LoDashExplicitObjectWrapper; + + /** + * @see _.assignInWith + */ + assignInWith(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + + //_.create + interface LoDashStatic { + /** + * Creates an object that inherits from the given prototype object. If a properties object is provided its own + * enumerable properties are assigned to the created object. + * + * @param prototype The object to inherit from. + * @param properties The properties to assign to the object. + * @return Returns the new object. + */ + create( + prototype: T, + properties?: U + ): T & U; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.create + */ + create(properties?: U): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.create + */ + create(properties?: U): LoDashExplicitObjectWrapper; + } + + //_.defaults + interface LoDashStatic { + /** + * Assigns own enumerable properties of source object(s) to the destination object for all destination + * properties that resolve to undefined. Once a property is set, additional values of the same property are + * ignored. + * + * Note: This method mutates object. + * + * @param object The destination object. + * @param sources The source objects. + * @return The destination object. + */ + defaults( + object: Obj, + ...sources: {}[] + ): TResult; + + /** + * @see _.defaults + */ + defaults( + object: Obj, + source1: S1, + ...sources: {}[] + ): TResult; + + /** + * @see _.defaults + */ + defaults( + object: Obj, + source1: S1, + source2: S2, + ...sources: {}[] + ): TResult; + + /** + * @see _.defaults + */ + defaults( + object: Obj, + source1: S1, + source2: S2, + source3: S3, + ...sources: {}[] + ): TResult; + + /** + * @see _.defaults + */ + defaults( + object: Obj, + source1: S1, + source2: S2, + source3: S3, + source4: S4, + ...sources: {}[] + ): TResult; + + /** + * @see _.defaults + */ + defaults( + object: {}, + ...sources: {}[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defaults + */ + defaults( + source1: S1, + ...sources: {}[] + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: S1, + source2: S2, + ...sources: {}[] + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: S1, + source2: S2, + source3: S3, + ...sources: {}[] + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: S1, + source2: S2, + source3: S3, + source4: S4, + ...sources: {}[] + ): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(): LoDashImplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(...sources: {}[]): LoDashImplicitObjectWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.defaults + */ + defaults( + source1: S1, + ...sources: {}[] + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: S1, + source2: S2, + ...sources: {}[] + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: S1, + source2: S2, + source3: S3, + ...sources: {}[] + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults( + source1: S1, + source2: S2, + source3: S3, + source4: S4, + ...sources: {}[] + ): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(): LoDashExplicitObjectWrapper; + + /** + * @see _.defaults + */ + defaults(...sources: {}[]): LoDashExplicitObjectWrapper; + } + + //_.defaultsDeep + interface LoDashStatic { + /** + * This method is like _.defaults except that it recursively assigns default properties. + * @param object The destination object. + * @param sources The source objects. + * @return Returns object. + **/ + defaultsDeep( + object: T, + ...sources: any[]): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.defaultsDeep + **/ + defaultsDeep(...sources: any[]): LoDashImplicitObjectWrapper + } + + //_.extend + interface LoDashStatic { + /** + * @see assign + */ + extend( + object: TObject, + source: TSource, + customizer?: AssignCustomizer, + thisArg?: any + ): TResult; + + /** + * @see assign + */ + extend( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer?: AssignCustomizer, + thisArg?: any + ): TResult; + + /** + * @see assign + */ + extend( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer?: AssignCustomizer, + thisArg?: any + ): TResult; + + /** + * @see assign + */ + extend + ( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer?: AssignCustomizer, + thisArg?: any + ): TResult; + + /** + * @see _.assign + */ + extend(object: TObject): TObject; + + /** + * @see _.assign + */ + extend( + object: TObject, ...otherArgs: any[] + ): TResult; + } + + interface LoDashImplicitObjectWrapper { + /** + * @see _.assign + */ + extend( + source: TSource, + customizer?: AssignCustomizer, + thisArg?: any + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + extend( + source1: TSource1, + source2: TSource2, + customizer?: AssignCustomizer, + thisArg?: any + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer?: AssignCustomizer, + thisArg?: any + ): LoDashImplicitObjectWrapper; + + /** + * @see assign + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer?: AssignCustomizer, + thisArg?: any + ): LoDashImplicitObjectWrapper; /** - * @see _.find - * @param _.where style callback - **/ - detect( - collection: Array, - pluckValue: string): T; + * @see _.assign + */ + extend(): LoDashImplicitObjectWrapper; /** - * @see _.find - * @param _.where style callback - **/ - detect( - collection: List, - pluckValue: string): T; + * @see _.assign + */ + extend(...otherArgs: any[]): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.find - * @param _.where style callback - **/ - detect( - collection: Dictionary, - pluckValue: string): T; + * @see _.assign + */ + extend( + source: TSource, + customizer?: AssignCustomizer, + thisArg?: any + ): LoDashExplicitObjectWrapper; /** - * @see _.find - **/ - findWhere( - collection: Array, - callback: ListIterator, - thisArg?: any): T; + * @see assign + */ + extend( + source1: TSource1, + source2: TSource2, + customizer?: AssignCustomizer, + thisArg?: any + ): LoDashExplicitObjectWrapper; /** - * @see _.find - **/ - findWhere( - collection: List, - callback: ListIterator, - thisArg?: any): T; + * @see assign + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer?: AssignCustomizer, + thisArg?: any + ): LoDashExplicitObjectWrapper; /** - * @see _.find - **/ - findWhere( - collection: Dictionary, - callback: ListIterator, - thisArg?: any): T; + * @see assign + */ + extend( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer?: AssignCustomizer, + thisArg?: any + ): LoDashExplicitObjectWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - findWhere( - collection: Array, - whereValue: W): T; + * @see _.assign + */ + extend(): LoDashExplicitObjectWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - findWhere( - collection: List, - whereValue: W): T; + * @see _.assign + */ + extend(...otherArgs: any[]): LoDashExplicitObjectWrapper; + } + //_.findKey + interface LoDashStatic { /** - * @see _.find - * @param _.pluck style callback - **/ - findWhere( - collection: Dictionary, - whereValue: W): T; + * This method is like _.find except that it returns the key 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 object The object to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the key of the matched element, else undefined. + */ + findKey( + object: TObject, + predicate?: DictionaryIterator, + thisArg?: any + ): string; /** - * @see _.find - * @param _.where style callback - **/ - findWhere( - collection: Array, - pluckValue: string): T; + * @see _.findKey + */ + findKey( + object: TObject, + predicate?: ObjectIterator, + thisArg?: any + ): string; /** - * @see _.find - * @param _.where style callback - **/ - findWhere( - collection: List, - pluckValue: string): T; + * @see _.findKey + */ + findKey( + object: TObject, + predicate?: string, + thisArg?: any + ): string; /** - * @see _.find - * @param _.where style callback - **/ - findWhere( - collection: Dictionary, - pluckValue: string): T; + * @see _.findKey + */ + findKey, TObject>( + object: TObject, + predicate?: TWhere + ): string; } - interface LoDashArrayWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.find - */ - find( - callback: ListIterator, - thisArg?: any): T; + * @see _.findKey + */ + findKey( + predicate?: DictionaryIterator, + thisArg?: any + ): string; + /** - * @see _.find - * @param _.where style callback - */ - find( - whereValue: W): T; + * @see _.findKey + */ + findKey( + predicate?: ObjectIterator, + thisArg?: any + ): string; /** - * @see _.find - * @param _.where style callback - */ - find( - pluckValue: string): T; - } + * @see _.findKey + */ + findKey( + predicate?: string, + thisArg?: any + ): string; - //_.findLast - interface LoDashStatic { /** - * This method is like _.find except that it iterates over elements of a collection from - * right to left. - * @param collection Searches for a value in this list. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The found element, else undefined. - **/ - findLast( - collection: Array, - callback: ListIterator, - thisArg?: any): T; + * @see _.findKey + */ + findKey>( + predicate?: TWhere + ): string; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.find - **/ - findLast( - collection: List, - callback: ListIterator, - thisArg?: any): T; + * @see _.findKey + */ + findKey( + predicate?: DictionaryIterator, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.find - **/ - findLast( - collection: Dictionary, - callback: ListIterator, - thisArg?: any): T; + * @see _.findKey + */ + findKey( + predicate?: ObjectIterator, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: Array, - whereValue: W): T; + * @see _.findKey + */ + findKey( + predicate?: string, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: List, - whereValue: W): T; + * @see _.findKey + */ + findKey>( + predicate?: TWhere + ): LoDashExplicitWrapper; + } + //_.findLastKey + interface LoDashStatic { /** - * @see _.find - * @param _.pluck style callback - **/ - findLast( - collection: Dictionary, - whereValue: W): T; + * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. + * + * 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 object The object to search. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the key of the matched element, else undefined. + */ + findLastKey( + object: TObject, + predicate?: DictionaryIterator, + thisArg?: any + ): string; /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: Array, - pluckValue: string): T; + * @see _.findLastKey + */ + findLastKey( + object: TObject, + predicate?: ObjectIterator, + thisArg?: any + ): string; /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: List, - pluckValue: string): T; + * @see _.findLastKey + */ + findLastKey( + object: TObject, + predicate?: string, + thisArg?: any + ): string; /** - * @see _.find - * @param _.where style callback - **/ - findLast( - collection: Dictionary, - pluckValue: string): T; + * @see _.findLastKey + */ + findLastKey, TObject>( + object: TObject, + predicate?: TWhere + ): string; } - interface LoDashArrayWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.findLast - */ - findLast( - callback: ListIterator, - thisArg?: any): T; + * @see _.findLastKey + */ + findLastKey( + predicate?: DictionaryIterator, + thisArg?: any + ): string; + /** - * @see _.findLast - * @param _.where style callback - */ - findLast( - whereValue: W): T; + * @see _.findLastKey + */ + findLastKey( + predicate?: ObjectIterator, + thisArg?: any + ): string; /** - * @see _.findLast - * @param _.where style callback - */ - findLast( - pluckValue: string): T; + * @see _.findLastKey + */ + findLastKey( + predicate?: string, + thisArg?: any + ): string; + + /** + * @see _.findLastKey + */ + findLastKey>( + predicate?: TWhere + ): string; } - //_.forEach - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Iterates over elements of a collection, executing the callback for each element. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, - * collection). Callbacks may exit iteration early by explicitly returning false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - forEach( - collection: Array, - callback: ListIterator, - thisArg?: any): Array; + * @see _.findLastKey + */ + findLastKey( + predicate?: DictionaryIterator, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.forEach - **/ - forEach( - collection: List, - callback: ListIterator, - thisArg?: any): List; + * @see _.findLastKey + */ + findLastKey( + predicate?: ObjectIterator, + thisArg?: any + ): LoDashExplicitWrapper; /** - * @see _.forEach - **/ - forEach( + * @see _.findLastKey + */ + findLastKey( + predicate?: string, + thisArg?: any + ): LoDashExplicitWrapper; + + /** + * @see _.findLastKey + */ + findLastKey>( + predicate?: TWhere + ): LoDashExplicitWrapper; + } + + //_.forIn + interface LoDashStatic { + /** + * Iterates over own and inherited enumerable properties of an object invoking iteratee for each property. The + * iteratee is bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may + * exit iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forIn( object: Dictionary, - callback: ObjectIterator, - thisArg?: any): Dictionary; + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; /** - * @see _.each - **/ - forEach( + * @see _.forIn + */ + forIn( object: T, - callback: ObjectIterator, - thisArg?: any): T + iteratee?: ObjectIterator, + thisArg?: any + ): T; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.forEach - **/ - each( - collection: Array, - callback: ListIterator, - thisArg?: any): Array; + * @see _.forIn + */ + forIn( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.forEach - **/ - each( - collection: List, - callback: ListIterator, - thisArg?: any): List; + * @see _.forIn + */ + forIn( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashExplicitObjectWrapper; + } + //_.forInRight + interface LoDashStatic { /** - * @see _.forEach - * @param object The object to iterate over - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - each( + * This method is like _.forIn except that it iterates over properties of object in the opposite order. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forInRight( object: Dictionary, - callback: ObjectIterator, - thisArg?: any): Dictionary; + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; /** - * @see _.each - **/ - each( + * @see _.forInRight + */ + forInRight( object: T, - callback: ObjectIterator, - thisArg?: any): T + iteratee?: ObjectIterator, + thisArg?: any + ): T; } - interface LoDashArrayWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.forEach - **/ - forEach( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.forInRight + */ + forInRight( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.forEach - **/ - each( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.forInRight + */ + forInRight( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashExplicitObjectWrapper; } - interface LoDashObjectWrapper { + //_.forOwn + interface LoDashStatic { /** - * @see _.forEach - **/ - forEach( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper; + * Iterates over own enumerable properties of an object invoking iteratee for each property. The iteratee is + * bound to thisArg and invoked with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forOwn( + object: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; /** - * @see _.forEach - **/ - each( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper; + * @see _.forOwn + */ + forOwn( + object: T, + iteratee?: ObjectIterator, + thisArg?: any + ): T; } - //_.forEachRight - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * This method is like _.forEach except that it iterates over elements of a - * collection from right to left. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - forEachRight( - collection: Array, - callback: ListIterator, - thisArg?: any): Array; + * @see _.forOwn + */ + forOwn( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.forEachRight - **/ - forEachRight( - collection: List, - callback: ListIterator, - thisArg?: any): List; + * @see _.forOwn + */ + forOwn( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashExplicitObjectWrapper; + } + //_.forOwnRight + interface LoDashStatic { /** - * @see _.forEachRight - **/ - forEachRight( + * This method is like _.forOwn except that it iterates over properties of object in the opposite order. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns object. + */ + forOwnRight( object: Dictionary, - callback: ObjectIterator, - thisArg?: any): Dictionary; + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; /** - * @see _.forEachRight - **/ - eachRight( - collection: Array, - callback: ListIterator, - thisArg?: any): Array; - - /** - * @see _.forEachRight - **/ - eachRight( - collection: List, - callback: ListIterator, - thisArg?: any): List; + * @see _.forOwnRight + */ + forOwnRight( + object: T, + iteratee?: ObjectIterator, + thisArg?: any + ): T; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.forEachRight - * @param object The object to iterate over - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - eachRight( - object: Dictionary, - callback: ObjectIterator, - thisArg?: any): Dictionary; + * @see _.forOwnRight + */ + forOwnRight( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashImplicitObjectWrapper; } - interface LoDashArrayWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.forEachRight - **/ - forEachRight( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.forOwnRight + */ + forOwnRight( + iteratee?: DictionaryIterator, + thisArg?: any + ): _.LoDashExplicitObjectWrapper; + } + //_.functions + interface LoDashStatic { /** - * @see _.forEachRight - **/ - eachRight( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + functions(object: any): string[]; } - interface LoDashObjectWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.forEachRight - **/ - forEachRight( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper>; + * @see _.functions + */ + functions(): _.LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.forEachRight - * @param object The object to iterate over - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - eachRight( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper>; + * @see _.functions + */ + functions(): _.LoDashExplicitArrayWrapper; } - //_.groupBy + //_.functionsIn interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element - * of a collection through the callback. The corresponding value of each key is an array - * of the elements responsible for generating the key. The callback is bound to thisArg - * and invoked with three arguments; (value, index|key, collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the composed aggregate object. - **/ - groupBy( - collection: Array, - callback?: ListIterator, - thisArg?: any): Dictionary; + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + functionsIn(object: any): string[]; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - collection: List, - callback?: ListIterator, - thisArg?: any): Dictionary; + * @see _.functionsIn + */ + functionsIn(): _.LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.groupBy - * @param pluckValue _.pluck style callback - **/ - groupBy( - collection: Array, - pluckValue: string): Dictionary; + * @see _.functionsIn + */ + functionsIn(): _.LoDashExplicitArrayWrapper; + } + //_.get + interface LoDashStatic { /** - * @see _.groupBy - * @param pluckValue _.pluck style callback - **/ - groupBy( - collection: List, - pluckValue: string): Dictionary; + * Gets the property value at path of object. If the resolved + * value is undefined the defaultValue is used in its place. + * @param object The object to query. + * @param path The path of the property to get. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + **/ + get(object: Object, + path: string|number|boolean|Array, + defaultValue?:TResult + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.groupBy - * @param whereValue _.where style callback - **/ - groupBy( - collection: Array, - whereValue: W): Dictionary; + * @see _.get + **/ + get(path: string|number|boolean|Array, + defaultValue?: TResult + ): TResult; + } + //_.has + interface LoDashStatic { /** - * @see _.groupBy - * @param whereValue _.where style callback - **/ - groupBy( - collection: List, - whereValue: W): Dictionary; + * Checks if `path` is a direct property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + has( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): Dictionary; + * @see _.has + */ + has(path: StringRepresentable|StringRepresentable[]): boolean; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.groupBy - * @param pluckValue _.pluck style callback - **/ - groupBy( - collection: Dictionary, - pluckValue: string): Dictionary; + * @see _.has + */ + has(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + //_.hasIn + interface LoDashStatic { /** - * @see _.groupBy - * @param whereValue _.where style callback - **/ - groupBy( - collection: Dictionary, - whereValue: W): Dictionary; + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b.c'); + * // => true + * + * _.hasIn(object, ['a', 'b', 'c']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false + */ + hasIn( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; } - interface LoDashArrayWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - callback: ListIterator, - thisArg?: any): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.hasIn + */ + hasIn(path: StringRepresentable|StringRepresentable[]): boolean; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - pluckValue: string): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.hasIn + */ + hasIn(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + //_.invert + interface LoDashStatic { /** - * @see _.groupBy - **/ - groupBy( - whereValue: W): _.LoDashObjectWrapper<_.Dictionary>; - } + * Creates an object composed of the inverted keys and values of object. If object contains duplicate values, + * subsequent values overwrite property assignments of previous values unless multiValue is true. + * + * @param object The object to invert. + * @param multiValue Allow multiple values per key. + * @return Returns the new inverted object. + */ + invert( + object: T, + multiValue?: boolean + ): TResult; - interface LoDashObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - callback: ListIterator, - thisArg?: any): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.invert + */ + invert( + object: Object, + multiValue?: boolean + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - pluckValue: string): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.invert + */ + invert(multiValue?: boolean): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.groupBy - **/ - groupBy( - whereValue: W): _.LoDashObjectWrapper<_.Dictionary>; + * @see _.invert + */ + invert(multiValue?: boolean): LoDashExplicitObjectWrapper; } - //_.indexBy + //_.keys interface LoDashStatic { /** - * Creates an object composed of keys generated from the results of running each element - * of the collection through the given callback. The corresponding value of each key is - * the last element responsible for generating the key. The callback is bound to thisArg - * and invoked with three arguments; (value, index|key, collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the composed aggregate object. - **/ - indexBy( - list: Array, - iterator: ListIterator, - context?: any): Dictionary; + * Creates an array of the own enumerable property names of object. + * + * Note: Non-object values are coerced to objects. See the ES spec for more details. + * + * @param object The object to query. + * @return Returns the array of property names. + */ + keys(object?: any): string[]; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.indexBy - **/ - indexBy( - list: List, - iterator: ListIterator, - context?: any): Dictionary; + * @see _.keys + */ + keys(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.indexBy - * @param pluckValue _.pluck style callback - **/ - indexBy( - collection: Array, - pluckValue: string): Dictionary; + * @see _.keys + */ + keys(): LoDashExplicitArrayWrapper; + } + //_.keysIn + interface LoDashStatic { /** - * @see _.indexBy - * @param pluckValue _.pluck style callback - **/ - indexBy( - collection: List, - pluckValue: string): Dictionary; + * Creates an array of the own and inherited enumerable property names of object. + * + * Note: Non-object values are coerced to objects. + * + * @param object The object to query. + * @return An array of property names. + */ + keysIn(object?: any): string[]; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.indexBy - * @param whereValue _.where style callback - **/ - indexBy( - collection: Array, - whereValue: W): Dictionary; + * @see _.keysIn + */ + keysIn(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.indexBy - * @param whereValue _.where style callback - **/ - indexBy( - collection: List, - whereValue: W): Dictionary; + * @see _.keysIn + */ + keysIn(): LoDashExplicitArrayWrapper; } - //_.invoke + //_.mapKeys interface LoDashStatic { /** - * Invokes the method named by methodName on each element in the collection returning - * an array of the results of each invoked method. Additional arguments will be provided - * to each invoked method. If methodName is a function it will be invoked for, and this - * bound to, each element in the collection. - * @param collection The collection to iterate over. - * @param methodName The name of the method to invoke. - * @param args Arguments to invoke the method with. - **/ - invoke( - collection: Array, - methodName: string, - ...args: any[]): any; + * The opposite of _.mapValues; this method creates an object with the same values as object and keys generated + * by running each own enumerable property of object through iteratee. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param thisArg The this binding of iteratee. + * @return Returns the new mapped object. + */ + mapKeys( + object: List, + iteratee?: ListIterator, + thisArg?: any + ): Dictionary; /** - * @see _.invoke - **/ - invoke( - collection: List, - methodName: string, - ...args: any[]): any; + * @see _.mapKeys + */ + mapKeys( + object: Dictionary, + iteratee?: DictionaryIterator, + thisArg?: any + ): Dictionary; /** - * @see _.invoke - **/ - invoke( - collection: Dictionary, - methodName: string, - ...args: any[]): any; + * @see _.mapKeys + */ + mapKeys( + object: List|Dictionary, + iteratee?: TObject + ): Dictionary; /** - * @see _.invoke - **/ - invoke( - collection: Array, - method: Function, - ...args: any[]): any; + * @see _.mapKeys + */ + mapKeys( + object: List|Dictionary, + iteratee?: string, + thisArg?: any + ): Dictionary; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.invoke - **/ - invoke( - collection: List, - method: Function, - ...args: any[]): any; + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; /** - * @see _.invoke - **/ - invoke( - collection: Dictionary, - method: Function, - ...args: any[]): any; + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashImplicitObjectWrapper>; + + /** + * @see _.mapKeys + */ + mapKeys( + iteratee?: string, + thisArg?: any + ): LoDashImplicitObjectWrapper>; } - //_.map - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Creates an array of values by running each element in the collection through the callback. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, - * collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param theArg The this binding of callback. - * @return The mapped array result. - **/ - map( - collection: Array, - callback: ListIterator, - thisArg?: any): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashImplicitObjectWrapper>; /** - * @see _.map - **/ - map( - collection: List, - callback: ListIterator, - thisArg?: any): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashImplicitObjectWrapper>; /** - * @see _.map - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg `this` object in `iterator`, optional. - * @return The mapped object result. - **/ - map( - object: Dictionary, - callback: ObjectIterator, - thisArg?: any): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: string, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.map - * @param pluckValue _.pluck style callback - **/ - map( - collection: Array, - pluckValue: string): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; /** - * @see _.map - * @param pluckValue _.pluck style callback - **/ - map( - collection: List, - pluckValue: string): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashExplicitObjectWrapper>; /** - * @see _.map - **/ - collect( - collection: Array, - callback: ListIterator, - thisArg?: any): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.map - **/ - collect( - collection: List, - callback: ListIterator, - thisArg?: any): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: ListIterator|DictionaryIterator, + thisArg?: any + ): LoDashExplicitObjectWrapper>; /** - * @see _.map - **/ - collect( - object: Dictionary, - callback: ObjectIterator, - thisArg?: any): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: TObject + ): LoDashExplicitObjectWrapper>; /** - * @see _.map - **/ - collect( - collection: Array, - pluckValue: string): TResult[]; + * @see _.mapKeys + */ + mapKeys( + iteratee?: string, + thisArg?: any + ): LoDashExplicitObjectWrapper>; + } + //_.mapValues + interface LoDashStatic { /** - * @see _.map - **/ - collect( - collection: List, - pluckValue: string): TResult[]; + * Creates an object with the same keys as object and values generated by running each own + * enumerable property of object through iteratee. The iteratee function is bound to thisArg + * and invoked with three arguments: (value, key, object). + * + * If a property name is provided iteratee the created "_.property" style callback returns + * the property value of the given element. + * + * If a value is also provided for thisArg the creted "_.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 {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration. + * @param {Object} [thisArg] The `this` binding of `iteratee`. + * @return {Object} Returns the new mapped object. + */ + mapValues(obj: Dictionary, callback: ObjectIterator, thisArg?: any): Dictionary; + mapValues(obj: Dictionary, where: Dictionary): Dictionary; + mapValues(obj: T, pluck: string): TMapped; + mapValues(obj: T, callback: ObjectIterator, thisArg?: any): T; } - interface LoDashArrayWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.map - **/ - map( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.mapValues + * TValue is the type of the property values of T. + * TResult is the type output by the ObjectIterator function + */ + mapValues(callback: ObjectIterator, thisArg?: any): LoDashImplicitObjectWrapper>; /** - * @see _.map - * @param pluckValue _.pluck style callback - **/ - map( - pluckValue: string): LoDashArrayWrapper; + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * T should be a Dictionary> + */ + mapValues(pluck: string): LoDashImplicitObjectWrapper>; /** - * @see _.map - **/ - collect( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * @see _.mapValues + * TResult is the type of the properties on the object specified by pluck. + * T should be a Dictionary>> + */ + mapValues(pluck: string, where: Dictionary): LoDashImplicitArrayWrapper>; /** - * @see _.map - **/ - collect( - pluckValue: string): LoDashArrayWrapper; + * @see _.mapValues + * TResult is the type of the properties of each object in the values of T + * T should be a Dictionary> + */ + mapValues(where: Dictionary): LoDashImplicitArrayWrapper; } - interface LoDashObjectWrapper { - /** - * @see _.map - **/ - map( - callback: ObjectIterator, - thisArg?: any): LoDashArrayWrapper; - + //_.merge + interface LoDashStatic { /** - * @see _.map - **/ - collect( - callback: ObjectIterator, - thisArg?: any): LoDashArrayWrapper; - } + * Recursively merges own and inherited enumerable properties of source + * objects into the destination object, skipping source properties that resolve + * to `undefined`. Array and plain object properties are merged recursively. + * Other objects and value types are overridden by assignment. Source objects + * are applied from left to right. Subsequent sources overwrite property + * assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + */ + merge( + object: TObject, + source: TSource + ): TObject & TSource; - //_.max - interface LoDashStatic { /** - * Retrieves the maximum value of a collection. If the collection is empty or falsey -Infinity is - * returned. If a callback is provided it will be executed for each value in the collection to - * generate the criterion by which the value is ranked. The callback is bound to thisArg and invoked - * with three arguments; (value, index, collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the maximum value. - **/ - max( - collection: Array, - callback?: ListIterator, - thisArg?: any): T; + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2 + ): TObject & TSource1 & TSource2; /** - * @see _.max - **/ - max( - collection: List, - callback?: ListIterator, - thisArg?: any): T; + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): TObject & TSource1 & TSource2 & TSource3; /** - * @see _.max - **/ - max( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): T; + * @see _.merge + */ + merge( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** - * @see _.max - * @param pluckValue _.pluck style callback - **/ - max( - collection: Array, - pluckValue: string): T; + * @see _.merge + */ + merge( + object: any, + ...otherArgs: any[] + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.max - * @param pluckValue _.pluck style callback - **/ - max( - collection: List, - pluckValue: string): T; + * @see _.merge + */ + merge( + source: TSource + ): LoDashImplicitObjectWrapper; /** - * @see _.max - * @param pluckValue _.pluck style callback - **/ - max( - collection: Dictionary, - pluckValue: string): T; + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2 + ): LoDashImplicitObjectWrapper; /** - * @see _.max - * @param whereValue _.where style callback - **/ - max( - collection: Array, - whereValue: W): T; + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashImplicitObjectWrapper; /** - * @see _.max - * @param whereValue _.where style callback - **/ - max( - collection: List, - whereValue: W): T; + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4 + ): LoDashImplicitObjectWrapper; /** - * @see _.max - * @param whereValue _.where style callback - **/ - max( - collection: Dictionary, - whereValue: W): T; + * @see _.merge + */ + merge( + ...otherArgs: any[] + ): LoDashImplicitObjectWrapper; } - interface LoDashArrayWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.max - **/ - max( - callback?: ListIterator, - thisArg?: any): LoDashWrapper; + * @see _.merge + */ + merge( + source: TSource + ): LoDashExplicitObjectWrapper; /** - * @see _.max - * @param pluckValue _.pluck style callback - **/ - max( - pluckValue: string): LoDashWrapper; + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2 + ): LoDashExplicitObjectWrapper; /** - * @see _.max - * @param whereValue _.where style callback - **/ - max( - whereValue: W): LoDashWrapper; - } + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3 + ): LoDashExplicitObjectWrapper; - //_.min - interface LoDashStatic { /** - * Retrieves the minimum value of a collection. If the collection is empty or falsey - * Infinity is returned. If a callback is provided it will be executed for each value - * in the collection to generate the criterion by which the value is ranked. The callback - * is bound to thisArg and invoked with three arguments; (value, index, collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return Returns the maximum value. - **/ - min( - collection: Array, - callback?: ListIterator, - thisArg?: any): T; + * @see _.merge + */ + merge( + ): LoDashExplicitObjectWrapper; /** - * @see _.min - **/ - min( - collection: List, - callback?: ListIterator, - thisArg?: any): T; + * @see _.merge + */ + merge( + ...otherArgs: any[] + ): LoDashExplicitObjectWrapper; + } + + //_.mergeWith + interface MergeWithCustomizer { + (value: any, srcValue: any, key?: string, object?: Object, source?: Object): any; + } + interface LoDashStatic { /** - * @see _.min - **/ - min( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): T; + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined` merging is handled by the + * method instead. The `customizer` is invoked with seven arguments: + * (objValue, srcValue, key, object, source, stack). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, customizer); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ + mergeWith( + object: TObject, + source: TSource, + customizer: MergeWithCustomizer + ): TObject & TSource; /** - * @see _.min - * @param pluckValue _.pluck style callback - **/ - min( - collection: Array, - pluckValue: string): T; + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2; /** - * @see _.min - * @param pluckValue _.pluck style callback - **/ - min( - collection: List, - pluckValue: string): T; + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2 & TSource3; /** - * @see _.min - * @param pluckValue _.pluck style callback - **/ - min( - collection: Dictionary, - pluckValue: string): T; + * @see _.mergeWith + */ + mergeWith( + object: TObject, + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: MergeWithCustomizer + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** - * @see _.min - * @param whereValue _.where style callback - **/ - min( - collection: Array, - whereValue: W): T; + * @see _.mergeWith + */ + mergeWith( + object: any, + ...otherArgs: any[] + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.min - * @param whereValue _.where style callback - **/ - min( - collection: List, - whereValue: W): T; + * @see _.mergeWith + */ + mergeWith( + source: TSource, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; /** - * @see _.min - * @param whereValue _.where style callback - **/ - min( - collection: Dictionary, - whereValue: W): T; - } + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; - interface LoDashArrayWrapper { /** - * @see _.min - **/ - min( - callback?: ListIterator, - thisArg?: any): LoDashWrapper; + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; /** - * @see _.min - * @param pluckValue _.pluck style callback - **/ - min( - pluckValue: string): LoDashWrapper; + * @see _.mergeWith + */ + mergeWith( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer: MergeWithCustomizer + ): LoDashImplicitObjectWrapper; /** - * @see _.min - * @param whereValue _.where style callback - **/ - min( - whereValue: W): LoDashWrapper; + * @see _.mergeWith + */ + mergeWith( + ...otherArgs: any[] + ): LoDashImplicitObjectWrapper; } - //_.pluck + //_.omit interface LoDashStatic { /** - * Retrieves the value of a specified property from all elements in the collection. - * @param collection The collection to iterate over. - * @param property The property to pluck. - * @return A new array of property values. - **/ - pluck( - collection: Array, - property: string): any[]; - - /** - * @see _.pluck - **/ - pluck( - collection: List, - property: string): any[]; + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [props] The property names to omit, specified + * individually or in arrays.. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ - /** - * @see _.pluck - **/ - pluck( - collection: Dictionary, - property: string): any[]; + omit( + object: T, + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): TResult; } - interface LoDashArrayWrapper { + interface LoDashImplicitObjectWrapper { + /** - * @see _.pluck - **/ - pluck( - property: string): LoDashArrayWrapper; + * @see _.omit + */ + omit( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashImplicitObjectWrapper; } - interface LoDashObjectWrapper { + interface LoDashExplicitObjectWrapper { + /** - * @see _.pluck - **/ - pluck( - property: string): LoDashArrayWrapper; + * @see _.omit + */ + omit( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashExplicitObjectWrapper; } - //_.reduce + //_.omitBy interface LoDashStatic { /** - * Reduces a collection to a value which is the accumulated result of running each - * element in the collection through the callback, where each successive callback execution - * consumes the return value of the previous execution. If accumulator is not provided the - * first element of the collection will be used as the initial accumulator value. The callback - * is bound to thisArg and invoked with four arguments; (accumulator, value, index|key, collection). - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. - * @return Returns the accumulated value. - **/ - reduce( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * The opposite of `_.pickBy`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that `predicate` + * doesn't return truthy for. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + omitBy( + object: T, + predicate: ObjectIterator + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reduce - **/ - reduce( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.omitBy + */ + omitBy( + predicate: ObjectIterator + ): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reduce - **/ - reduce( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.omitBy + */ + omitBy( + predicate: ObjectIterator + ): LoDashExplicitObjectWrapper; + } + //_.pick + interface LoDashStatic { /** - * @see _.reduce - **/ - reduce( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * Creates an object composed of the picked `object` properties. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [props] The property names to pick, specified + * individually or in arrays. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + pick( + object: T, + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reduce - **/ - reduce( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.pick + */ + pick( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reduce - **/ - reduce( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.pick + */ + pick( + ...predicate: (StringRepresentable|StringRepresentable[])[] + ): LoDashExplicitObjectWrapper; + } + //_.pickBy + interface LoDashStatic { /** - * @see _.reduce - **/ - inject( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|Object|string} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + pickBy( + object: T, + predicate: ObjectIterator + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reduce - **/ - inject( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.pickBy + */ + pickBy( + predicate: ObjectIterator + ): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reduce - **/ - inject( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.pickBy + */ + pickBy( + predicate: ObjectIterator + ): LoDashExplicitObjectWrapper; + } + //_.result + interface LoDashStatic { /** - * @see _.reduce - **/ - inject( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * This method is like _.get except that if the resolved value is a function it’s invoked with the this binding + * of its parent object and its result is returned. + * + * @param object The object to query. + * @param path The path of the property to resolve. + * @param defaultValue The value returned if the resolved value is undefined. + * @return Returns the resolved value. + */ + result( + object: TObject, + path: number|string|boolean|Array, + defaultValue?: TResult + ): TResult; + } + interface LoDashImplicitWrapperBase { /** - * @see _.reduce - **/ - inject( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.result + */ + result( + path: number|string|boolean|Array, + defaultValue?: TResult + ): TResult; + } + //_.set + interface LoDashStatic { /** - * @see _.reduce - **/ - inject( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; + * Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for + * missing index properties while objects are created for all other missing properties. Use _.setWith to + * customize path creation. + * + * @param object The object to modify. + * @param path The path of the property to set. + * @param value The value to set. + * @return Returns object. + */ + set( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: any + ): TResult; /** - * @see _.reduce - **/ - foldl( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.set + */ + set( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: V + ): TResult; /** - * @see _.reduce - **/ - foldl( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.set + */ + set( + object: O, + path: StringRepresentable|StringRepresentable[], + value: V + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reduce - **/ - foldl( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: any + ): LoDashImplicitObjectWrapper; /** - * @see _.reduce - **/ - foldl( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: V + ): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reduce - **/ - foldl( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: any + ): LoDashExplicitObjectWrapper; /** - * @see _.reduce - **/ - foldl( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.set + */ + set( + path: StringRepresentable|StringRepresentable[], + value: V + ): LoDashExplicitObjectWrapper; } - interface LoDashArrayWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + //_.setWith + interface SetWithCustomizer { + (nsValue: any, key: string, nsObject: T): any; + } + interface LoDashStatic { /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - thisArg?: any): TResult; + * This method is like _.set except that it accepts customizer which is invoked to produce the objects of + * path. If customizer returns undefined path creation is handled by the method instead. The customizer is + * invoked with three arguments: (nsValue, key, nsObject). + * + * @param object The object to modify. + * @param path The path of the property to set. + * @param value The value to set. + * @parem customizer The function to customize assigned values. + * @return Returns object. + */ + setWith( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): TResult; /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.setWith + */ + setWith( + object: Object, + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): TResult; /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.setWith + */ + setWith( + object: O, + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): TResult; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): LoDashImplicitObjectWrapper; /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): LoDashImplicitObjectWrapper; } - interface LoDashObjectWrapper { - /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; - + interface LoDashExplicitObjectWrapper { /** - * @see _.reduce - **/ - reduce( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: any, + customizer?: SetWithCustomizer + ): LoDashExplicitObjectWrapper; /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.setWith + */ + setWith( + path: StringRepresentable|StringRepresentable[], + value: V, + customizer?: SetWithCustomizer + ): LoDashExplicitObjectWrapper; + } + //_.toPairs + interface LoDashStatic { /** - * @see _.reduce - **/ - inject( - callback: MemoIterator, - thisArg?: any): TResult; + * Creates an array of own enumerable key-value pairs for object. + * + * @param object The object to query. + * @return Returns the new array of key-value pairs. + */ + toPairs(object?: T): any[][]; + toPairs(object?: T): TResult[][]; + } + + interface LoDashImplicitObjectWrapper { /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.toPairs + */ + toPairs(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reduce - **/ - foldl( - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.toPairs + */ + toPairs(): LoDashExplicitArrayWrapper; } - //_.reduceRight + //_.toPairsIn interface LoDashStatic { /** - * This method is like _.reduce except that it iterates over elements of a collection from - * right to left. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator Initial value of the accumulator. - * @param thisArg The this binding of callback. - * @return The accumulated value. - **/ - reduceRight( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * Creates an array of own and inherited enumerable key-value pairs for object. + * + * @param object The object to query. + * @return Returns the new array of key-value pairs. + */ + toPairsIn(object?: T): any[][]; - /** - * @see _.reduceRight - **/ - reduceRight( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + toPairsIn(object?: T): TResult[][]; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reduceRight - **/ - reduceRight( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.toPairsIn + */ + toPairsIn(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reduceRight - **/ - reduceRight( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.toPairsIn + */ + toPairsIn(): LoDashExplicitArrayWrapper; + } + //_.transform + interface LoDashStatic { /** - * @see _.reduceRight - **/ - reduceRight( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * An alternative to _.reduce; this method transforms object to a new accumulator object which is the result of + * running each of its own enumerable properties through iteratee, with each invocation potentially mutating + * the accumulator object. The iteratee is bound to thisArg and invoked with four arguments: (accumulator, + * value, key, object). Iteratee functions may exit iteration early by explicitly returning false. + * + * @param object The object to iterate over. + * @param iteratee The function invoked per iteration. + * @param accumulator The custom accumulator value. + * @param thisArg The this binding of iteratee. + * @return Returns the accumulated value. + */ + transform( + object: T[], + iteratee?: MemoVoidArrayIterator, + accumulator?: TResult[], + thisArg?: any + ): TResult[]; /** - * @see _.reduceRight - **/ - reduceRight( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.transform + */ + transform( + object: T[], + iteratee?: MemoVoidArrayIterator>, + accumulator?: Dictionary, + thisArg?: any + ): Dictionary; /** - * @see _.reduceRight - **/ - foldr( - collection: Array, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.transform + */ + transform( + object: Dictionary, + iteratee?: MemoVoidDictionaryIterator>, + accumulator?: Dictionary, + thisArg?: any + ): Dictionary; /** - * @see _.reduceRight - **/ - foldr( - collection: List, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.transform + */ + transform( + object: Dictionary, + iteratee?: MemoVoidDictionaryIterator, + accumulator?: TResult[], + thisArg?: any + ): TResult[]; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.reduceRight - **/ - foldr( - collection: Dictionary, - callback: MemoIterator, - accumulator: TResult, - thisArg?: any): TResult; + * @see _.transform + */ + transform( + iteratee?: MemoVoidArrayIterator, + accumulator?: TResult[], + thisArg?: any + ): LoDashImplicitArrayWrapper; /** - * @see _.reduceRight - **/ - foldr( - collection: Array, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.transform + */ + transform( + iteratee?: MemoVoidArrayIterator>, + accumulator?: Dictionary, + thisArg?: any + ): LoDashImplicitObjectWrapper>; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reduceRight - **/ - foldr( - collection: List, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.transform + */ + transform( + iteratee?: MemoVoidDictionaryIterator>, + accumulator?: Dictionary, + thisArg?: any + ): LoDashImplicitObjectWrapper>; /** - * @see _.reduceRight - **/ - foldr( - collection: Dictionary, - callback: MemoIterator, - thisArg?: any): TResult; + * @see _.transform + */ + transform( + iteratee?: MemoVoidDictionaryIterator, + accumulator?: TResult[], + thisArg?: any + ): LoDashImplicitArrayWrapper; } - //_.reject + //_.unset interface LoDashStatic { /** - * The opposite of _.filter this method returns the elements of a collection that - * the callback does not return truey for. - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return A new array of elements that failed the callback check. - **/ - reject( - collection: Array, - callback: ListIterator, - thisArg?: any): T[]; + * Removes the property at path of object. + * + * Note: This method mutates object. + * + * @param object The object to modify. + * @param path The path of the property to unset. + * @return Returns true if the property is deleted, else false. + */ + unset( + object: T, + path: StringRepresentable|StringRepresentable[] + ): boolean; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reject - **/ - reject( - collection: List, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.unset + */ + unset(path: StringRepresentable|StringRepresentable[]): LoDashImplicitWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reject - **/ - reject( - collection: Dictionary, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.unset + */ + unset(path: StringRepresentable|StringRepresentable[]): LoDashExplicitWrapper; + } + //_.values + interface LoDashStatic { /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject( - collection: Array, - pluckValue: string): T[]; + * Creates an array of the own enumerable property values of object. + * + * @param object The object to query. + * @return Returns an array of property values. + */ + values(object?: any): T[]; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject( - collection: List, - pluckValue: string): T[]; + * @see _.values + */ + values(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject( - collection: Dictionary, - pluckValue: string): T[]; + * @see _.values + */ + values(): LoDashExplicitArrayWrapper; + } + //_.valuesIn + interface LoDashStatic { /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: Array, - whereValue: W): T[]; + * Creates an array of the own and inherited enumerable property values of object. + * + * @param object The object to query. + * @return Returns the array of property values. + */ + valuesIn(object?: any): T[]; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: List, - whereValue: W): T[]; + * @see _.valuesIn + */ + valuesIn(): LoDashImplicitArrayWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject( - collection: Dictionary, - whereValue: W): T[]; + * @see _.valuesIn + */ + valuesIn(): LoDashExplicitArrayWrapper; } - interface LoDashArrayWrapper { + /********** + * String * + **********/ + + //_.camelCase + interface LoDashStatic { /** - * @see _.reject - **/ - reject( - callback: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * Converts string to camel case. + * + * @param string The string to convert. + * @return Returns the camel cased string. + */ + camelCase(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.reject - * @param pluckValue _.pluck style callback - **/ - reject(pluckValue: string): LoDashArrayWrapper; + * @see _.camelCase + */ + camelCase(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.reject - * @param whereValue _.where style callback - **/ - reject(whereValue: W): LoDashArrayWrapper; + * @see _.camelCase + */ + camelCase(): LoDashExplicitWrapper; } - //_.sample + //_.capitalize interface LoDashStatic { /** - * Retrieves a random element or n random elements from a collection. - * @param collection The collection to sample. - * @return Returns the random sample(s) of collection. - **/ - sample(collection: Array): T; + * Converts the first character of string to upper case and the remaining to lower case. + * + * @param string The string to capitalize. + * @return Returns the capitalized string. + */ + capitalize(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.sample - **/ - sample(collection: List): T; + * @see _.capitalize + */ + capitalize(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.sample - **/ - sample(collection: Dictionary): T; + * @see _.capitalize + */ + capitalize(): LoDashExplicitWrapper; + } + //_.deburr + interface LoDashStatic { /** - * @see _.sample - * @param n The number of elements to sample. - **/ - sample(collection: Array, n: number): T[]; + * Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining + * diacritical marks. + * + * @param string The string to deburr. + * @return Returns the deburred string. + */ + deburr(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.sample - * @param n The number of elements to sample. - **/ - sample(collection: List, n: number): T[]; + * @see _.deburr + */ + deburr(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.sample - * @param n The number of elements to sample. - **/ - sample(collection: Dictionary, n: number): T[]; + * @see _.deburr + */ + deburr(): LoDashExplicitWrapper; } - //_.shuffle + //_.endsWith interface LoDashStatic { /** - * Creates an array of shuffled values, using a version of the Fisher-Yates shuffle. - * See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. - * @param collection The collection to shuffle. - * @return Returns a new shuffled collection. - **/ - shuffle(collection: Array): T[]; + * Checks if string ends with the given target string. + * + * @param string The string to search. + * @param target The string to search for. + * @param position The position to search from. + * @return Returns true if string ends with target, else false. + */ + endsWith( + string?: string, + target?: string, + position?: number + ): boolean; + } + interface LoDashImplicitWrapper { /** - * @see _.shuffle - **/ - shuffle(collection: List): T[]; + * @see _.endsWith + */ + endsWith( + target?: string, + position?: number + ): boolean; + } + interface LoDashExplicitWrapper { /** - * @see _.shuffle - **/ - shuffle(collection: Dictionary): T[]; + * @see _.endsWith + */ + endsWith( + target?: string, + position?: number + ): LoDashExplicitWrapper; } - //_.size + // _.escape interface LoDashStatic { /** - * Gets the size of the collection by returning collection.length for arrays and array-like - * objects or the number of own enumerable properties for objects. - * @param collection The collection to inspect. - * @return collection.length - **/ - size(collection: Array): number; + * Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities. + * + * Note: No other characters are escaped. To escape additional characters use a third-party library like he. + * + * hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML + * and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s + * article (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59, + * #102, #108, and #133 of the HTML5 Security Cheatsheet for more details. + * + * When working with HTML you should always quote attribute values to reduce XSS vectors. + * + * @param string The string to escape. + * @return Returns the escaped string. + */ + escape(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.size - **/ - size(collection: List): number; + * @see _.escape + */ + escape(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.size - * @param object The object to inspect - * @return The number of own enumerable properties. - **/ - size(object: T): number; + * @see _.escape + */ + escape(): LoDashExplicitWrapper; + } + // _.escapeRegExp + interface LoDashStatic { /** - * @see _.size - * @param aString The string to inspect - * @return The length of aString - **/ - size(aString: string): number; + * Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", + * "{", "}", and "|" in string. + * + * @param string The string to escape. + * @return Returns the escaped string. + */ + escapeRegExp(string?: string): string; } - //_.some - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Checks if the callback returns a truey value for any element of a collection. The function - * returns as soon as it finds a passing value and does not iterate over the entire collection. - * The callback is bound to thisArg and invoked with three arguments; (value, index|key, collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return True if any element passed the callback check, else false. - **/ - some( - collection: Array, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.escapeRegExp + */ + escapeRegExp(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.some - **/ - some( - collection: List, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.escapeRegExp + */ + escapeRegExp(): LoDashExplicitWrapper; + } + //_.kebabCase + interface LoDashStatic { /** - * @see _.some - **/ - some( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): boolean; + * Converts string to kebab case. + * + * @param string The string to convert. + * @return Returns the kebab cased string. + */ + kebabCase(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.some - **/ - some( - collection: {}, - callback?: ListIterator<{}, boolean>, - thisArg?: any): boolean; + * @see _.kebabCase + */ + kebabCase(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - some( - collection: Array, - pluckValue: string): boolean; + * @see _.kebabCase + */ + kebabCase(): LoDashExplicitWrapper; + } + //_.lowerCase + interface LoDashStatic { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - some( - collection: List, - pluckValue: string): boolean; + * Converts `string`, as space separated words, to lower case. + * + * @param string The string to convert. + * @return Returns the lower cased string. + */ + lowerCase(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - some( - collection: Dictionary, - pluckValue: string): boolean; + * @see _.lowerCase + */ + lowerCase(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - some( - collection: Array, - whereValue: W): boolean; + * @see _.lowerCase + */ + lowerCase(): LoDashExplicitWrapper; + } + //_.lowerFirst + interface LoDashStatic { /** - * @see _.some - * @param whereValue _.where style callback - **/ - some( - collection: List, - whereValue: W): boolean; + * Converts the first character of `string` to lower case. + * + * @param string The string to convert. + * @return Returns the converted string. + */ + lowerFirst(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - some( - collection: Dictionary, - whereValue: W): boolean; + * @see _.lowerFirst + */ + lowerFirst(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.some - **/ - any( - collection: Array, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.lowerFirst + */ + lowerFirst(): LoDashExplicitWrapper; + } + //_.pad + interface LoDashStatic { /** - * @see _.some - **/ - any( - collection: List, - callback?: ListIterator, - thisArg?: any): boolean; + * Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if + * they can’t be evenly divided by length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + pad( + string?: string, + length?: number, + chars?: string + ): string; + } + interface LoDashImplicitWrapper { /** - * @see _.some - **/ - any( - collection: Dictionary, - callback?: ListIterator, - thisArg?: any): boolean; + * @see _.pad + */ + pad( + length?: number, + chars?: string + ): string; + } + interface LoDashExplicitWrapper { /** - * @see _.some - **/ - any( - collection: {}, - callback?: ListIterator<{}, boolean>, - thisArg?: any): boolean; + * @see _.pad + */ + pad( + length?: number, + chars?: string + ): LoDashExplicitWrapper; + } + //_.padEnd + interface LoDashStatic { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - any( - collection: Array, - pluckValue: string): boolean; + * Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed + * length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + padEnd( + string?: string, + length?: number, + chars?: string + ): string; + } + interface LoDashImplicitWrapper { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - any( - collection: List, - pluckValue: string): boolean; + * @see _.padEnd + */ + padEnd( + length?: number, + chars?: string + ): string; + } + interface LoDashExplicitWrapper { /** - * @see _.some - * @param pluckValue _.pluck style callback - **/ - any( - collection: Dictionary, - pluckValue: string): boolean; + * @see _.padEnd + */ + padEnd( + length?: number, + chars?: string + ): LoDashExplicitWrapper; + } + //_.padStart + interface LoDashStatic { /** - * @see _.some - * @param whereValue _.where style callback - **/ - any( - collection: Array, - whereValue: W): boolean; + * Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed + * length. + * + * @param string The string to pad. + * @param length The padding length. + * @param chars The string used as padding. + * @return Returns the padded string. + */ + padStart( + string?: string, + length?: number, + chars?: string + ): string; + } + interface LoDashImplicitWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - any( - collection: List, - whereValue: W): boolean; + * @see _.padStart + */ + padStart( + length?: number, + chars?: string + ): string; + } + interface LoDashExplicitWrapper { /** - * @see _.some - * @param whereValue _.where style callback - **/ - any( - collection: Dictionary, - whereValue: W): boolean; + * @see _.padStart + */ + padStart( + length?: number, + chars?: string + ): LoDashExplicitWrapper; } - //_.sortBy + //_.parseInt interface LoDashStatic { /** - * Creates an array of elements, sorted in ascending order by the results of running each - * element in a collection through the callback. This method performs a stable sort, that - * is, it will preserve the original sort order of equal elements. The callback is bound - * to thisArg and invoked with three arguments; (value, index|key, collection). - * - * 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 collection The collection to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return A new array of sorted elements. - **/ - sortBy( - collection: Array, - callback?: ListIterator, - thisArg?: any): T[]; + * Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used + * unless value is a hexadecimal, in which case a radix of 16 is used. + * + * Note: This method aligns with the ES5 implementation of parseInt. + * + * @param string The string to convert. + * @param radix The radix to interpret value by. + * @return Returns the converted integer. + */ + parseInt( + string: string, + radix?: number + ): number; + } + interface LoDashImplicitWrapper { /** - * @see _.sortBy - **/ - sortBy( - collection: List, - callback?: ListIterator, - thisArg?: any): T[]; + * @see _.parseInt + */ + parseInt(radix?: number): number; + } + interface LoDashExplicitWrapper { /** - * @see _.sortBy - * @param pluckValue _.pluck style callback - **/ - sortBy( - collection: Array, - pluckValue: string): T[]; + * @see _.parseInt + */ + parseInt(radix?: number): LoDashExplicitWrapper; + } + //_.repeat + interface LoDashStatic { /** - * @see _.sortBy - * @param pluckValue _.pluck style callback - **/ - sortBy( - collection: List, - pluckValue: string): T[]; + * Repeats the given string n times. + * + * @param string The string to repeat. + * @param n The number of times to repeat the string. + * @return Returns the repeated string. + */ + repeat( + string?: string, + n?: number + ): string; + } + interface LoDashImplicitWrapper { /** - * @see _.sortBy - * @param whereValue _.where style callback - **/ - sortBy( - collection: Array, - whereValue: W): T[]; + * @see _.repeat + */ + repeat(n?: number): string; + } + interface LoDashExplicitWrapper { /** - * @see _.sortBy - * @param whereValue _.where style callback - **/ - sortBy( - collection: List, - whereValue: W): T[]; + * @see _.repeat + */ + repeat(n?: number): LoDashExplicitWrapper; } - interface LoDashArrayWrapper { + //_.replace + interface LoDashStatic { /** - * @see _.sortBy - **/ - sortBy( - callback?: ListIterator, - thisArg?: any): LoDashArrayWrapper; + * Replaces matches for pattern in string with replacement. + * + * Note: This method is based on String#replace. + * + * @param string + * @param pattern + * @param replacement + * @return Returns the modified string. + */ + replace( + string: string, + pattern: RegExp|string, + replacement: Function|string + ): string; /** - * @see _.sortBy - * @param pluckValue _.pluck style callback - **/ - sortBy(pluckValue: string): LoDashArrayWrapper; + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; + } + interface LoDashImplicitWrapper { /** - * @see _.sortBy - * @param whereValue _.where style callback - **/ - sortBy(whereValue: W): LoDashArrayWrapper; - } + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; - //_.toArray - interface LoDashStatic { /** - * Converts the collection to an array. - * @param collection The collection to convert. - * @return The new converted array. - **/ - toArray(collection: Array): T[]; + * @see _.replace + */ + replace( + replacement?: Function|string + ): string; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.toArray - **/ - toArray(collection: List): T[]; + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): string; /** - * @see _.toArray - **/ - toArray(collection: Dictionary): T[]; + * @see _.replace + */ + replace( + replacement?: Function|string + ): string; } - interface LoDashArrayWrapper { + interface LoDashExplicitWrapper { /** - * @see _.toArray - **/ - toArray(): LoDashArrayWrapper; - } + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): LoDashExplicitWrapper; - interface LoDashObjectWrapper { /** - * @see _.toArray - **/ - toArray(): LoDashArrayWrapper; + * @see _.replace + */ + replace( + replacement?: Function|string + ): LoDashExplicitWrapper; } - //_.where - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Performs a deep comparison of each element in a collection to the given properties - * object, returning an array of all elements that have equivalent property values. - * @param collection The collection to iterate over. - * @param properties The object of property values to filter by. - * @return A new array of elements that have the given properties. - **/ - where( - list: Array, - properties: U): T[]; + * @see _.replace + */ + replace( + pattern?: RegExp|string, + replacement?: Function|string + ): LoDashExplicitWrapper; /** - * @see _.where - **/ - where( - list: List, - properties: U): T[]; + * @see _.replace + */ + replace( + replacement?: Function|string + ): LoDashExplicitWrapper; + } + //_.snakeCase + interface LoDashStatic { /** - * @see _.where - **/ - where( - list: Dictionary, - properties: U): T[]; + * Converts string to snake case. + * + * @param string The string to convert. + * @return Returns the snake cased string. + */ + snakeCase(string?: string): string; } - interface LoDashArrayWrapper { + interface LoDashImplicitWrapper { /** - * @see _.where - **/ - where(properties: U): LoDashArrayWrapper; + * @see _.snakeCase + */ + snakeCase(): string; } - /************* - * Functions * - *************/ + interface LoDashExplicitWrapper { + /** + * @see _.snakeCase + */ + snakeCase(): LoDashExplicitWrapper; + } - //_.after + //_.split interface LoDashStatic { /** - * Creates a function that executes func, with the this binding and arguments of the - * created function, only after being called n times. - * @param n The number of times the function must be called before func is executed. - * @param func The function to restrict. - * @return The new restricted function. - **/ - after( - n: number, - func: Function): Function; + * Splits string by separator. + * + * Note: This method is based on String#split. + * + * @param string + * @param separator + * @param limit + * @return Returns the new array of string segments. + */ + split( + string: string, + separator?: RegExp|string, + limit?: number + ): string[]; } - interface LoDashWrapper { + interface LoDashImplicitWrapper { /** - * @see _.after - **/ - after(func: Function): LoDashObjectWrapper; + * @see _.split + */ + split( + separator?: RegExp|string, + limit?: number + ): LoDashImplicitArrayWrapper; } - //_.bind - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Creates a function that, when called, invokes func with the this binding of thisArg - * and prepends any additional bind arguments to those provided to the bound function. - * @param func The function to bind. - * @param thisArg The this binding of func. - * @param args Arguments to be partially applied. - * @return The new bound function. - **/ - bind( - func: Function, - thisArg: any, - ...args: any[]): () => any; + * @see _.split + */ + split( + separator?: RegExp|string, + limit?: number + ): LoDashExplicitArrayWrapper; } - interface LoDashObjectWrapper { + //_.startCase + interface LoDashStatic { /** - * @see _.bind - **/ - bind( - thisArg: any, - ...args: any[]): LoDashObjectWrapper<() => any>; + * Converts string to start case. + * + * @param string The string to convert. + * @return Returns the start cased string. + */ + startCase(string?: string): string; } - //_.bindAll - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Binds methods of an object to the object itself, overwriting the existing method. Method - * names may be specified as individual arguments or as arrays of method names. If no method - * names are provided all the function properties of object will be bound. - * @param object The object to bind and assign the bound methods to. - * @param methodNames The object method names to bind, specified as individual method names - * or arrays of method names. - * @return object - **/ - bindAll( - object: T, - ...methodNames: string[]): T; + * @see _.startCase + */ + startCase(): string; } - interface LoDashObjectWrapper { + interface LoDashExplicitWrapper { /** - * @see _.bindAll - **/ - bindAll(...methodNames: string[]): LoDashWrapper; + * @see _.startCase + */ + startCase(): LoDashExplicitWrapper; } - //_.bindKey + //_.startsWith interface LoDashStatic { /** - * Creates a function that, when called, invokes the method at object[key] and prepends any - * additional bindKey arguments to those provided to the bound function. This method differs - * from _.bind by allowing bound functions to reference methods that will be redefined or don't - * yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern. - * @param object The object the method belongs to. - * @param key The key of the method. - * @param args Arguments to be partially applied. - * @return The new bound function. - **/ - bindKey( - object: T, - key: string, - ...args: any[]): Function; + * Checks if string starts with the given target string. + * + * @param string The string to search. + * @param target The string to search for. + * @param position The position to search from. + * @return Returns true if string starts with target, else false. + */ + startsWith( + string?: string, + target?: string, + position?: number + ): boolean; } - interface LoDashObjectWrapper { + interface LoDashImplicitWrapper { /** - * @see _.bindKey - **/ - bindKey( - key: string, - ...args: any[]): LoDashObjectWrapper; + * @see _.startsWith + */ + startsWith( + target?: string, + position?: number + ): boolean; } - //_.compose - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Creates a function that is the composition of the provided functions, where each function - * consumes the return value of the function that follows. For example, composing the functions - * f(), g(), and h() produces f(g(h())). Each function is executed with the this binding of the - * composed function. - * @param funcs Functions to compose. - * @return The new composed function. - **/ - compose(...funcs: Function[]): Function; + * @see _.startsWith + */ + startsWith( + target?: string, + position?: number + ): LoDashExplicitWrapper; } - interface LoDashObjectWrapper { + //_.template + interface TemplateOptions extends TemplateSettings { /** - * @see _.compose - **/ - compose(...funcs: Function[]): LoDashObjectWrapper; + * The sourceURL of the template's compiled source. + */ + sourceURL?: string; } - //_.createCallback - interface LoDashStatic { - /** - * Produces a callback bound to an optional thisArg. If func is a property name the created - * callback will return the property value for a given element. If func is an object the created - * callback will return true for elements that contain the equivalent object properties, - * otherwise it will return false. - * @param func The value to convert to a callback. - * @param thisArg The this binding of the created callback. - * @param argCount The number of arguments the callback accepts. - * @return A callback function. - **/ - createCallback( - func: string, - thisArg?: any, - argCount?: number): () => any; + interface TemplateExecutor { + (data?: Object): string; + source: string; + } + interface LoDashStatic { /** - * @see _.createCallback - **/ - createCallback( - func: Dictionary, - thisArg?: any, - argCount?: number): () => boolean; + * Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, + * HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" + * delimiters. Data properties may be accessed as free variables in the template. If a setting object is + * provided it takes precedence over _.templateSettings values. + * + * Note: In the development build _.template utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier + * debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @param string The template string. + * @param options The options object. + * @param options.escape The HTML "escape" delimiter. + * @param options.evaluate The "evaluate" delimiter. + * @param options.imports An object to import into the template as free variables. + * @param options.interpolate The "interpolate" delimiter. + * @param options.sourceURL The sourceURL of the template's compiled source. + * @param options.variable The data object variable name. + * @return Returns the compiled template function. + */ + template( + string: string, + options?: TemplateOptions + ): TemplateExecutor; } - interface LoDashWrapper { + interface LoDashImplicitWrapper { /** - * @see _.createCallback - **/ - createCallback( - thisArg?: any, - argCount?: number): LoDashObjectWrapper<() => any>; + * @see _.template + */ + template(options?: TemplateOptions): TemplateExecutor; } - interface LoDashObjectWrapper { + interface LoDashExplicitWrapper { /** - * @see _.createCallback - **/ - createCallback( - thisArg?: any, - argCount?: number): LoDashObjectWrapper<() => any>; + * @see _.template + */ + template(options?: TemplateOptions): LoDashExplicitObjectWrapper; } - //_.curry + //_.toLower interface LoDashStatic { /** - * Creates a function which accepts one or more arguments of func that when invoked either - * executes func returning its result, if all func arguments have been provided, or returns - * a function that accepts one or more of the remaining func arguments, and so on. The arity - * of func can be specified if func.length is not sufficient. - * @param func The function to curry. - * @param arity The arity of func. - * @return The new curried function. - **/ - curry( - func: Function, - arity?: number): Function; + * Converts `string`, as a whole, to lower case. + * + * @param string The string to convert. + * @return Returns the lower cased string. + */ + toLower(string?: string): string; } - interface LoDashObjectWrapper { + interface LoDashImplicitWrapper { /** - * @see _.curry - **/ - curry(arity?: number): LoDashObjectWrapper; + * @see _.toLower + */ + toLower(): string; } - //_.debounce - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Creates a function that will delay the execution of func until after wait milliseconds have - * elapsed since the last time it was invoked. Provide an options object to indicate that func - * should be invoked on the leading and/or trailing edge of the wait timeout. Subsequent calls - * to the debounced function will return the result of the last func call. - * - * Note: If leading and trailing options are true func will be called on the trailing edge of - * the timeout only if the the debounced function is invoked more than once during the wait - * timeout. - * @param func The function to debounce. - * @param wait The number of milliseconds to delay. - * @param options The options object. - * @param options.leading Specify execution on the leading edge of the timeout. - * @param options.maxWait The maximum time func is allowed to be delayed before it’s called. - * @param options.trailing Specify execution on the trailing edge of the timeout. - * @return The new debounced function. - **/ - debounce( - func: T, - wait: number, - options?: DebounceSettings): T; + * @see _.toLower + */ + toLower(): LoDashExplicitWrapper; } - interface LoDashObjectWrapper { + //_.toUpper + interface LoDashStatic { /** - * @see _.debounce - **/ - debounce( - wait: number, - options?: DebounceSettings): LoDashObjectWrapper; + * Converts `string`, as a whole, to upper case. + * + * @param string The string to convert. + * @return Returns the upper cased string. + */ + toUpper(string?: string): string; } - interface DebounceSettings { + interface LoDashImplicitWrapper { /** - * Specify execution on the leading edge of the timeout. - **/ - leading?: boolean; + * @see _.toUpper + */ + toUpper(): string; + } + interface LoDashExplicitWrapper { /** - * The maximum time func is allowed to be delayed before it’s called. - **/ - maxWait?: number; + * @see _.toUpper + */ + toUpper(): LoDashExplicitWrapper; + } + //_.trim + interface LoDashStatic { /** - * Specify execution on the trailing edge of the timeout. - **/ - trailing?: boolean; + * Removes leading and trailing whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trim( + string?: string, + chars?: string + ): string; } - //_.defer - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Defers executing the func function until the current call stack has cleared. Additional - * arguments will be provided to func when it is invoked. - * @param func The function to defer. - * @param args Arguments to invoke the function with. - * @return The timer id. - **/ - defer( - func: Function, - ...args: any[]): number; + * @see _.trim + */ + trim(chars?: string): string; } - interface LoDashObjectWrapper { + interface LoDashExplicitWrapper { /** - * @see _.defer - **/ - defer(...args: any[]): LoDashWrapper; + * @see _.trim + */ + trim(chars?: string): LoDashExplicitWrapper; } - //_.delay + //_.trimEnd interface LoDashStatic { /** - * Executes the func function after wait milliseconds. Additional arguments will be provided - * to func when it is invoked. - * @param func The function to delay. - * @param wait The number of milliseconds to delay execution. - * @param args Arguments to invoke the function with. - * @return The timer id. - **/ - delay( - func: Function, - wait: number, - ...args: any[]): number; + * Removes trailing whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trimEnd( + string?: string, + chars?: string + ): string; } - interface LoDashObjectWrapper { + interface LoDashImplicitWrapper { /** - * @see _.delay - **/ - delay( - wait: number, - ...args: any[]): LoDashWrapper; + * @see _.trimEnd + */ + trimEnd(chars?: string): string; } - //_.memoize - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Creates a function that memoizes the result of func. If resolver is provided it will be - * used to determine the cache key for storing the result based on the arguments provided to - * the memoized function. By default, the first argument provided to the memoized function is - * used as the cache key. The func is executed with the this binding of the memoized function. - * The result cache is exposed as the cache property on the memoized function. - * @param func Computationally expensive function that will now memoized results. - * @param resolver Hash function for storing the result of `fn`. - * @return Returns the new memoizing function. - **/ - memoize( - func: T, - resolver?: Function): T; + * @see _.trimEnd + */ + trimEnd(chars?: string): LoDashExplicitWrapper; } - //_.once + //_.trimStart interface LoDashStatic { /** - * Creates a function that is restricted to execute func once. Repeat calls to the function - * will return the value of the first call. The func is executed with the this binding of the - * created function. - * @param func Function to only execute once. - * @return The new restricted function. - **/ - once(func: T): T; + * Removes leading whitespace or specified characters from string. + * + * @param string The string to trim. + * @param chars The characters to trim. + * @return Returns the trimmed string. + */ + trimStart( + string?: string, + chars?: string + ): string; } - //_.partial - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Creates a function that, when called, invokes func with any additional partial arguments - * prepended to those provided to the new function. This method is similar to _.bind except - * it does not alter the this binding. - * @param func The function to partially apply arguments to. - * @param args Arguments to be partially applied. - * @return The new partially applied function. - **/ - partial( - func: Function, - ...args: any[]): Function; + * @see _.trimStart + */ + trimStart(chars?: string): string; } - //_.partialRight - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * This method is like _.partial except that partial arguments are appended to those provided - * to the new function. - * @param func The function to partially apply arguments to. - * @param args Arguments to be partially applied. - * @return The new partially applied function. - **/ - partialRight( - func: Function, - ...args: any[]): Function; + * @see _.trimStart + */ + trimStart(chars?: string): LoDashExplicitWrapper; + } + + //_.truncate + interface TruncateOptions { + /** The maximum string length. */ + length?: number; + /** The string to indicate text is omitted. */ + omission?: string; + /** The separator pattern to truncate to. */ + separator?: string|RegExp; } - //_.throttle interface LoDashStatic { /** - * Creates a function that, when executed, will only call the func function at most once per - * every wait milliseconds. Provide an options object to indicate that func should be invoked - * on the leading and/or trailing edge of the wait timeout. Subsequent calls to the throttled - * function will return the result of the last func call. - * - * Note: If leading and trailing options are true func will be called on the trailing edge of - * the timeout only if the the throttled function is invoked more than once during the wait timeout. - * @param func The function to throttle. - * @param wait The number of milliseconds to throttle executions to. - * @param options The options object. - * @param options.leading Specify execution on the leading edge of the timeout. - * @param options.trailing Specify execution on the trailing edge of the timeout. - * @return The new throttled function. - **/ - throttle( - func: T, - wait: number, - options?: ThrottleSettings): T; + * Truncates string if it’s longer than the given maximum string length. The last characters of the truncated + * string are replaced with the omission string which defaults to "…". + * + * @param string The string to truncate. + * @param options The options object or maximum string length. + * @return Returns the truncated string. + */ + truncate( + string?: string, + options?: TruncateOptions + ): string; } - interface ThrottleSettings { - + interface LoDashImplicitWrapper { /** - * If you'd like to disable the leading-edge call, pass this as false. - **/ - leading?: boolean; + * @see _.truncate + */ + truncate(options?: TruncateOptions): string; + } + interface LoDashExplicitWrapper { /** - * If you'd like to disable the execution on the trailing-edge, pass false. - **/ - trailing?: boolean; + * @see _.truncate + */ + truncate(options?: TruncateOptions): LoDashExplicitWrapper; } - //_.wrap + //_.unescape interface LoDashStatic { /** - * Creates a function that provides value to the wrapper function as its first argument. - * Additional arguments provided to the function are appended to those provided to the - * wrapper function. The wrapper is executed with the this binding of the created function. - * @param value The value to wrap. - * @param wrapper The wrapper function. - * @return The new function. - **/ - wrap( - value: any, - wrapper: (func: Function, ...args: any[]) => any): Function; + * The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and ` + * in string to their corresponding characters. + * + * Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library + * like he. + * + * @param string The string to unescape. + * @return Returns the unescaped string. + */ + unescape(string?: string): string; } - /************* - * Objects * - *************/ - - //_.assign - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Assigns own enumerable properties of source object(s) to the destination object. Subsequent - * sources will overwrite property assignments of previous sources. If a callback is provided - * it will be executed to produce the assigned values. The callback is bound to thisArg and - * invoked with two arguments; (objectValue, sourceValue). - * @param object The destination object. - * @param s1-8 The source object(s) - * @param callback The function to customize merging properties. - * @param thisArg The this binding of callback. - * @return The destination object. - **/ - assign( - object: T, - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.unescape + */ + unescape(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.assign - **/ - assign( - object: T, - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.unescape + */ + unescape(): LoDashExplicitWrapper; + } + //_.upperCase + interface LoDashStatic { /** - * @see _.assign - **/ - assign( - object: T, - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * Converts `string`, as space separated words, to upper case. + * + * @param string The string to convert. + * @return Returns the upper cased string. + */ + upperCase(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.assign - **/ - assign( - object: T, - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.upperCase + */ + upperCase(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.assign - **/ - extend( - object: T, - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.upperCase + */ + upperCase(): LoDashExplicitWrapper; + } + //_.upperFirst + interface LoDashStatic { /** - * @see _.assign - **/ - extend( - object: T, - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * Converts the first character of `string` to upper case. + * + * @param string The string to convert. + * @return Returns the converted string. + */ + upperFirst(string?: string): string; + } + interface LoDashImplicitWrapper { /** - * @see _.assign - **/ - extend( - object: T, - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.upperFirst + */ + upperFirst(): string; + } + interface LoDashExplicitWrapper { /** - * @see _.assign - **/ - extend( - object: T, - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.upperFirst + */ + upperFirst(): LoDashExplicitWrapper; } - interface LoDashObjectWrapper { + //_.words + interface LoDashStatic { /** - * @see _.assign - **/ - assign( - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * Splits `string` into an array of its words. + * + * @param string The string to inspect. + * @param pattern The pattern to match words. + * @return Returns the words of `string`. + */ + words( + string?: string, + pattern?: string|RegExp + ): string[]; + } + interface LoDashImplicitWrapper { /** - * @see _.assign - **/ - assign( - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; - /** - * @see _.assign - **/ - assign( - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; - /** - * @see _.assign - **/ - assign( - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; - /** - * @see _.assign - **/ - assign( - s1: S1, - s2: S2, - s3: S3, - s4: S4, - s5: S5, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.words + */ + words(pattern?: string|RegExp): string[]; + } + interface LoDashExplicitWrapper { /** - * @see _.assign - **/ - extend( - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.words + */ + words(pattern?: string|RegExp): LoDashExplicitArrayWrapper; + } + /*********** + * Utility * + ***********/ + + //_.attempt + interface LoDashStatic { /** - * @see _.assign - **/ - extend( - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * Attempts to invoke func, returning either the result or the caught error object. Any additional arguments + * are provided to func when it’s invoked. + * + * @param func The function to attempt. + * @return Returns the func result or error object. + */ + attempt(func: (...args: any[]) => TResult, ...args: any[]): TResult|Error; + } + + interface LoDashImplicitObjectWrapper { /** - * @see _.assign - **/ - extend( - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.attempt + */ + attempt(...args: any[]): TResult|Error; + } + + interface LoDashExplicitObjectWrapper { /** - * @see _.assign - **/ - extend( - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * @see _.attempt + */ + attempt(...args: any[]): LoDashExplicitObjectWrapper; + } + + //_.constant + interface LoDashStatic { /** - * @see _.assign - **/ - extend( - s1: S1, - s2: S2, - s3: S3, - s4: S4, - s5: S5, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): TResult; + * Creates a function that returns value. + * + * @param value The value to return from the new function. + * @return Returns the new function. + */ + constant(value: T): () => T; + } + interface LoDashImplicitWrapperBase { + /** + * @see _.constant + */ + constant(): LoDashImplicitObjectWrapper<() => TResult>; } - //_.clone - interface LoDashStatic { + interface LoDashExplicitWrapperBase { /** - * Creates a clone of value. If deep is true nested objects will also be cloned, otherwise - * they will be assigned by reference. If a callback is provided it will be executed to produce - * the cloned values. If the callback returns undefined cloning will be handled by the method - * instead. The callback is bound to thisArg and invoked with one argument; (value). - * @param value The value to clone. - * @param deep Specify a deep clone. - * @param callback The function to customize cloning values. - * @param thisArg The this binding of callback. - * @return The cloned value. - **/ - clone( - value: T, - deep?: boolean, - callback?: (value: any) => any, - thisArg?: any): T; + * @see _.constant + */ + constant(): LoDashExplicitObjectWrapper<() => TResult>; } - //_.cloneDeep + //_.identity interface LoDashStatic { /** - * Creates a deep clone of value. If a callback is provided it will be executed to produce the - * cloned values. If the callback returns undefined cloning will be handled by the method instead. - * The callback is bound to thisArg and invoked with one argument; (value). - * - * Note: This method is loosely based on the structured clone algorithm. Functions and DOM nodes - * are not cloned. The enumerable properties of arguments objects and objects created by constructors - * other than Object are cloned to plain Object objects. - * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. - * @param value The value to clone. - * @param callback The function to customize cloning values. - * @param thisArg The this binding of callback. - * @return The cloned value. - **/ - cloneDeep( - value: T, - callback?: (value: any) => any, - thisArg?: any): T; + * This method returns the first argument provided to it. + * @param value Any value. + * @return Returns value. + */ + identity(value?: T): T; } - //_.defaults - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Assigns own enumerable properties of source object(s) to the destination object for all - * destination properties that resolve to undefined. Once a property is set, additional defaults - * of the same property will be ignored. - * @param object The destination object. - * @param sources The source objects. - * @return The destination object. - **/ - defaults( - object: T, - ...sources: any[]): TResult; + * @see _.identity + */ + identity(): T; } - interface LoDashObjectWrapper { + interface LoDashImplicitArrayWrapper { /** - * @see _.defaults - **/ - defaults(...sources: any[]): LoDashObjectWrapper + * @see _.identity + */ + identity(): T[]; } - //_.findKey + interface LoDashImplicitObjectWrapper { + /** + * @see _.identity + */ + identity(): T; + } + + //_.iteratee interface LoDashStatic { /** - * This method is like _.findIndex except that it returns the key of the first element that - * passes the callback check, instead of the element itself. - * @param object The object to search. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The key of the found element, else undefined. - **/ - findKey( - object: any, - callback: (value: any) => boolean, - thisArg?: any): string; + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name the created callback returns the + * property value for a given element. If `func` is an object the created + * callback returns `true` for elements that contain the equivalent object properties, otherwise it returns `false`. + * + * @static + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // create custom iteratee shorthands + * _.iteratee = _.wrap(_.iteratee, function(callback, func) { + * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func); + * return !p ? callback(func) : function(object) { + * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]); + * }; + * }); + * + * _.filter(users, 'age > 36'); + * // => [{ 'user': 'fred', 'age': 40 }] + */ + iteratee( + func: Function, + thisArg?: any + ): (...args: any[]) => TResult; /** - * @see _.findKey - * @param pluckValue _.pluck style callback - **/ - findKey( - object: any, - pluckValue: string): string; + * @see _.iteratee + */ + iteratee( + func: string, + thisArg?: any + ): (object: any) => TResult; /** - * @see _.findKey - * @param whereValue _.where style callback - **/ - findKey, T>( - object: T, - whereValue: W): string; + * @see _.iteratee + */ + iteratee( + func: Object, + thisArg?: any + ): (object: any) => boolean; + + /** + * @see _.iteratee + */ + iteratee(): (value: TResult) => TResult; } - //_.findLastKey - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * This method is like _.findKey except that it iterates over elements of a collection in the opposite order. - * @param object The object to search. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return The key of the found element, else undefined. - **/ - findLastKey( - object: any, - callback: (value: any) => boolean, - thisArg?: any): string; + * @see _.iteratee + */ + iteratee(thisArg?: any): LoDashImplicitObjectWrapper<(object: any) => TResult>; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.findLastKey - * @param pluckValue _.pluck style callback - **/ - findLastKey( - object: any, - pluckValue: string): string; + * @see _.iteratee + */ + iteratee(thisArg?: any): LoDashImplicitObjectWrapper<(object: any) => boolean>; /** - * @see _.findLastKey - * @param whereValue _.where style callback - **/ - findLastKey, T>( - object: T, - whereValue: W): string; + * @see _.iteratee + */ + iteratee(thisArg?: any): LoDashImplicitObjectWrapper<(...args: any[]) => TResult>; } - //_.forIn - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Iterates over own and inherited enumerable properties of an object, executing the callback for - * each property. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). Callbacks may exit iteration early by explicitly returning false. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forIn( - object: Dictionary, - callback?: ObjectIterator, - thisArg?: any): Dictionary; + * @see _.iteratee + */ + iteratee(thisArg?: any): LoDashExplicitObjectWrapper<(object: any) => TResult>; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.forIn - **/ - forIn( - object: T, - callback?: ObjectIterator, - thisArg?: any): T; - } + * @see _.iteratee + */ + iteratee(thisArg?: any): LoDashExplicitObjectWrapper<(object: any) => boolean>; - interface LoDashObjectWrapper { /** - * @see _.forIn - **/ - forIn( - callback: ObjectIterator, - thisArg?: any): _.LoDashObjectWrapper; + * @see _.iteratee + */ + iteratee(thisArg?: any): LoDashExplicitObjectWrapper<(...args: any[]) => TResult>; } - //_.forInRight + //_.matches interface LoDashStatic { /** - * This method is like _.forIn except that it iterates over elements of a collection in the - * opposite order. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forInRight( - object: Dictionary, - callback?: ObjectIterator, - thisArg?: any): Dictionary; + * Creates a function that performs a deep comparison between a given object and source, returning true if the + * given object has equivalent property values, else false. + * + * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and + * strings. Objects are compared by their own, not inherited, enumerable properties. For comparing a single own + * or inherited property value see _.matchesProperty. + * + * @param source The object of property values to match. + * @return Returns the new function. + */ + matches(source: T): (value: any) => boolean; /** - * @see _.forInRight - **/ - forInRight( - object: T, - callback?: ObjectIterator, - thisArg?: any): T; + * @see _.matches + */ + matches(source: T): (value: V) => boolean; } - interface LoDashObjectWrapper { + interface LoDashImplicitWrapperBase { /** - * @see _.forInRight - **/ - forInRight( - callback: ObjectIterator, - thisArg?: any): _.LoDashObjectWrapper; + * @see _.matches + */ + matches(): LoDashImplicitObjectWrapper<(value: V) => boolean>; } - //_.forOwn - interface LoDashStatic { + interface LoDashExplicitWrapperBase { /** - * Iterates over own enumerable properties of an object, executing the callback for each - * property. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). Callbacks may exit iteration early by explicitly returning false. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forOwn( - object: Dictionary, - callback?: ObjectIterator, - thisArg?: any): Dictionary; + * @see _.matches + */ + matches(): LoDashExplicitObjectWrapper<(value: V) => boolean>; + } + //_.matchesProperty + interface LoDashStatic { /** - * @see _.forOwn - **/ - forOwn( - object: T, - callback?: ObjectIterator, - thisArg?: any): T; - } + * Creates a function that compares the property value of path on a given object to value. + * + * Note: This method supports comparing arrays, booleans, Date objects, numbers, Object objects, regexes, and + * strings. Objects are compared by their own, not inherited, enumerable properties. + * + * @param path The path of the property to get. + * @param srcValue The value to match. + * @return Returns the new function. + */ + matchesProperty( + path: StringRepresentable|StringRepresentable[], + srcValue: T + ): (value: any) => boolean; - interface LoDashObjectWrapper { /** - * @see _.forOwn - **/ - forOwn( - callback: ObjectIterator, - thisArg?: any): _.LoDashObjectWrapper; + * @see _.matchesProperty + */ + matchesProperty( + path: StringRepresentable|StringRepresentable[], + srcValue: T + ): (value: V) => boolean; } - //_.forOwnRight - interface LoDashStatic { + interface LoDashImplicitWrapperBase { /** - * This method is like _.forOwn except that it iterates over elements of a collection in the - * opposite order. - * @param object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - * @return object - **/ - forOwnRight( - object: Dictionary, - callback?: ObjectIterator, - thisArg?: any): Dictionary; + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashImplicitObjectWrapper<(value: any) => boolean>; + /** - * @see _.forOwnRight - **/ - forOwnRight( - object: T, - callback?: ObjectIterator, - thisArg?: any): T; + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashImplicitObjectWrapper<(value: Value) => boolean>; } - interface LoDashObjectWrapper { + interface LoDashExplicitWrapperBase { /** - * @see _.forOwnRight - **/ - forOwnRight( - callback: ObjectIterator, - thisArg?: any): _.LoDashObjectWrapper; + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashExplicitObjectWrapper<(value: any) => boolean>; + + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashExplicitObjectWrapper<(value: Value) => boolean>; } - //_.functions + //_.method interface LoDashStatic { /** - * Creates a sorted array of property names of all enumerable properties, own and inherited, of - * object that have function values. - * @param object The object to inspect. - * @return An array of property names that have function values. - **/ - functions(object: any): string[]; + * Creates a function that invokes the method at path on a given object. Any additional arguments are provided + * to the invoked method. + * + * @param path The path of the method to invoke. + * @param args The arguments to invoke the method with. + * @return Returns the new function. + */ + method( + path: string|StringRepresentable[], + ...args: any[] + ): (object: TObject) => TResult; /** - * @see _functions - **/ - methods(object: any): string[]; + * @see _.method + */ + method( + path: string|StringRepresentable[], + ...args: any[] + ): (object: any) => TResult; } - interface LoDashObjectWrapper { + interface LoDashImplicitWrapper { /** - * @see _.functions - **/ - functions(): _.LoDashArrayWrapper; + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; /** - * @see _.functions - **/ - methods(): _.LoDashArrayWrapper; + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; } - //_.has - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Checks if the specified object property exists and is a direct property, instead of an - * inherited property. - * @param object The object to check. - * @param property The property to check for. - * @return True if key is a direct property, else false. - **/ - has(object: any, property: string): boolean; + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashImplicitObjectWrapper<(object: any) => TResult>; } - //_.invert - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Creates an object composed of the inverted keys and values of the given object. - * @param object The object to invert. - * @return The created inverted object. - **/ - invert(object: any): any; + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; } - //_.isArguments - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Checks if value is an arguments object. - * @param value The value to check. - * @return True if the value is an arguments object, else false. - **/ - isArguments(value: any): boolean; + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: TObject) => TResult>; + + /** + * @see _.method + */ + method(...args: any[]): LoDashExplicitObjectWrapper<(object: any) => TResult>; } - //_.isArray + //_.methodOf interface LoDashStatic { /** - * Checks if value is an array. - * @param value The value to check. - * @return True if the value is an array, else false. - **/ - isArray(value: any): boolean; + * The opposite of _.method; this method creates a function that invokes the method at a given path on object. + * Any additional arguments are provided to the invoked method. + * + * @param object The object to query. + * @param args The arguments to invoke the method with. + * @return Returns the new function. + */ + methodOf( + object: TObject, + ...args: any[] + ): (path: StringRepresentable|StringRepresentable[]) => TResult; + + /** + * @see _.methodOf + */ + methodOf( + object: {}, + ...args: any[] + ): (path: StringRepresentable|StringRepresentable[]) => TResult; } - //_.isBoolean - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Checks if value is a boolean value. - * @param value The value to check. - * @return True if the value is a boolean value, else false. - **/ - isBoolean(value: any): boolean; + * @see _.methodOf + */ + methodOf( + ...args: any[] + ): LoDashImplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; } - //_.isDate - interface LoDashStatic { + interface LoDashExplicitObjectWrapper { /** - * Checks if value is a date. - * @param value The value to check. - * @return True if the value is a date, else false. - **/ - isDate(value: any): boolean; + * @see _.methodOf + */ + methodOf( + ...args: any[] + ): LoDashExplicitObjectWrapper<(path: StringRepresentable|StringRepresentable[]) => TResult>; + } + + //_.mixin + interface MixinOptions { + chain?: boolean; } - //_.isElement interface LoDashStatic { /** - * Checks if value is a DOM element. - * @param value The value to check. - * @return True if the value is a DOM element, else false. - **/ - isElement(value: any): boolean; + * Adds all own enumerable function properties of a source object to the destination object. If object is a + * function then methods are added to its prototype as well. + * + * Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying + * the original. + * + * @param object The destination object. + * @param source The object of functions to add. + * @param options The options object. + * @param options.chain Specify whether the functions added are chainable. + * @return Returns object. + */ + mixin( + object: TObject, + source: Dictionary, + options?: MixinOptions + ): TResult; + + /** + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): TResult; } - //_.isEmpty - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Checks if value is empty. Arrays, strings, or arguments objects with a length of 0 and objects - * with no own enumerable properties are considered "empty". - * @param value The value to inspect. - * @return True if the value is empty, else false. - **/ - isEmpty(value: any[]): boolean; + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): LoDashImplicitObjectWrapper; /** - * @see _.isEmpty - **/ - isEmpty(value: Dictionary): boolean; + * @see _.mixin + */ + mixin( + options?: MixinOptions + ): LoDashImplicitObjectWrapper; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.isEmpty - **/ - isEmpty(value: string): boolean; + * @see _.mixin + */ + mixin( + source: Dictionary, + options?: MixinOptions + ): LoDashExplicitObjectWrapper; /** - * @see _.isEmpty - **/ - isEmpty(value: any): boolean; + * @see _.mixin + */ + mixin( + options?: MixinOptions + ): LoDashExplicitObjectWrapper; } - //_.isEqual + //_.noConflict interface LoDashStatic { /** - * Performs a deep comparison between two values to determine if they are equivalent to each - * other. If a callback is provided it will be executed to compare values. If the callback - * returns undefined comparisons will be handled by the method instead. The callback is bound to - * thisArg and invoked with two arguments; (a, b). - * @param a The value to compare. - * @param b The other value to compare. - * @param callback The function to customize comparing values. - * @param thisArg The this binding of callback. - * @return True if the values are equivalent, else false. - **/ - isEqual( - a: any, - b: any, - callback?: (a: any, b: any) => boolean, - thisArg?: any): boolean; + * Reverts the _ variable to its previous value and returns a reference to the lodash function. + * + * @return Returns the lodash function. + */ + noConflict(): typeof _; } - //_.isFinite - interface LoDashStatic { + interface LoDashImplicitWrapperBase { /** - * Checks if value is, or can be coerced to, a finite number. - * - * Note: This is not the same as native isFinite which will return true for booleans and empty - * strings. See http://es5.github.io/#x15.1.2.5. - * @param value The value to check. - * @return True if the value is finite, else false. - **/ - isFinite(value: any): boolean; + * @see _.noConflict + */ + noConflict(): typeof _; } - //_.isFunction + //_.noop interface LoDashStatic { /** - * Checks if value is a function. - * @param value The value to check. - * @return True if the value is a function, else false. - **/ - isFunction(value: any): boolean; + * A no-operation function that returns undefined regardless of the arguments it receives. + * + * @return undefined + */ + noop(...args: any[]): void; } - //_.isNaN - interface LoDashStatic { + interface LoDashImplicitWrapperBase { /** - * Checks if value is NaN. - * - * Note: This is not the same as native isNaN which will return true for undefined and other - * non-numeric values. See http://es5.github.io/#x15.1.2.4. - * @param value The value to check. - * @return True if the value is NaN, else false. - **/ - isNaN(value: any): boolean; + * @see _.noop + */ + noop(...args: any[]): void; } - //_.isNull - interface LoDashStatic { + interface LoDashExplicitWrapperBase { /** - * Checks if value is null. - * @param value The value to check. - * @return True if the value is null, else false. - **/ - isNull(value: any): boolean; + * @see _.noop + */ + noop(...args: any[]): _.LoDashExplicitWrapper; } - //_.isNumber + //_.nthArg interface LoDashStatic { /** - * Checks if value is a number. - * - * Note: NaN is considered a number. See http://es5.github.io/#x8.5. - * @param value The value to check. - * @return True if the value is a number, else false. - **/ - isNumber(value: any): boolean; + * Creates a function that returns its nth argument. + * + * @param n The index of the argument to return. + * @return Returns the new function. + */ + nthArg(n?: number): TResult; } - //_.isObject - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, - * new Number(0), and new String('')) - * @param value The value to check. - * @return True if the value is an object, else false. - **/ - isObject(value: any): boolean; + * @see _.nthArg + */ + nthArg(): LoDashImplicitObjectWrapper; } - //_.isPlainObject - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Checks if value is an object created by the Object constructor. - * @param value The value to check. - * @return True if value is a plain object, else false. - **/ - isPlainObject(value: any): boolean; + * @see _.nthArg + */ + nthArg(): LoDashExplicitObjectWrapper; } - //_.isRegExp + //_.over interface LoDashStatic { /** - * Checks if value is a regular expression. - * @param value The value to check. - * @return True if the value is a regular expression, else false. - **/ - isRegExp(value: any): boolean; + * Creates a function that invokes iteratees with the arguments provided to the created function and returns + * their results. + * + * @param iteratees The iteratees to invoke. + * @return Returns the new function. + */ + over(...iteratees: (Function|Function[])[]): (...args: any[]) => TResult[]; } - //_.isString - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Checks if value is a string. - * @param value The value to check. - * @return True if the value is a string, else false. - **/ - isString(value: any): boolean; + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; } - //_.isUndefined - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * Checks if value is undefined. - * @param value The value to check. - * @return True if the value is undefined, else false. - **/ - isUndefined(value: any): boolean; + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => TResult[]>; } - //_.keys - interface LoDashStatic { + interface LoDashExplicitArrayWrapper { /** - * Creates an array composed of the own enumerable property names of an object. - * @param object The object to inspect. - * @return An array of property names. - **/ - keys(object: any): string[]; + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; } - interface LoDashObjectWrapper { + interface LoDashExplicitObjectWrapper { /** - * @see _.keys - **/ - keys(): LoDashArrayWrapper + * @see _.over + */ + over(...iteratees: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => TResult[]>; } - //_.mapValues + //_.overEvery interface LoDashStatic { /** - * Creates an object with the same keys as object and values generated by running each own - * enumerable property of object through the callback. The callback is bound to thisArg and - * invoked with three arguments; (value, key, object). - * - * 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 object The object to iterate over. - * @param callback The function called per iteration. - * @param thisArg `this` object in `iterator`, optional. - * @return Returns a new object with values of the results of each callback execution. - */ - mapValues(obj: Dictionary, callback: ObjectIterator, thisArg?: any): Dictionary; - mapValues(obj: Dictionary, where: Dictionary): Dictionary; - mapValues(obj: T, pluck: string): TMapped; - mapValues(obj: T, callback: ObjectIterator, thisArg?: any): T; + * Creates a function that checks if all of the predicates return truthy when invoked with the arguments + * provided to the created function. + * + * @param predicates The predicates to check. + * @return Returns the new function. + */ + overEvery(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; } - //_.merge - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Recursively merges own enumerable properties of the source object(s), that don't resolve - * to undefined into the destination object. Subsequent sources will overwrite property - * assignments of previous sources. If a callback is provided it will be executed to produce - * the merged values of the destination and source properties. If the callback returns undefined - * merging will be handled by the method instead. The callback is bound to thisArg and invoked - * with two arguments; (objectValue, sourceValue). - * @param object The destination object. - * @param s1-8 The source object(s) - * @param callback The function to customize merging properties. - * @param thisArg The this binding of callback. - * @return The destination object. - **/ - merge( - object: T, - s1: S1, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.merge - **/ - merge( - object: T, - s1: S1, - s2: S2, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.merge - **/ - merge( - object: T, - s1: S1, - s2: S2, - s3: S3, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.merge - **/ - merge( - object: T, - s1: S1, - s2: S2, - s3: S3, - s4: S4, - callback?: (objectValue: Value, sourceValue: Value) => Value, - thisArg?: any): Result; + * @see _.overEvery + */ + overEvery(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; } - //_.omit + //_.overSome interface LoDashStatic { /** - * Creates a shallow clone of object excluding the specified properties. Property names may be - * specified as individual arguments or as arrays of property names. If a callback is provided - * it will be executed for each property of object omitting the properties the callback returns - * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). - * @param object The source object. - * @param keys The properties to omit. - * @return An object without the omitted properties. - **/ - omit( - object: T, - ...keys: string[]): Omitted; - - /** - * @see _.omit - **/ - omit( - object: T, - keys: string[]): Omitted; + * Creates a function that checks if any of the predicates return truthy when invoked with the arguments + * provided to the created function. + * + * @param predicates The predicates to check. + * @return Returns the new function. + */ + overSome(...predicates: (Function|Function[])[]): (...args: any[]) => boolean; + } + interface LoDashImplicitArrayWrapper { /** - * @see _.omit - **/ - omit( - object: T, - callback: ObjectIterator, - thisArg?: any): Omitted; + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; } - interface LoDashObjectWrapper { + interface LoDashImplicitObjectWrapper { /** - * @see _.omit - **/ - omit( - ...keys: string[]): LoDashObjectWrapper; + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashImplicitObjectWrapper<(...args: any[]) => boolean>; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.omit - **/ - omit( - keys: string[]): LoDashObjectWrapper; + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.omit - **/ - omit( - callback: ObjectIterator, - thisArg?: any): LoDashObjectWrapper; + * @see _.overSome + */ + overSome(...predicates: (Function|Function[])[]): LoDashExplicitObjectWrapper<(...args: any[]) => boolean>; } - //_.pairs + //_.property interface LoDashStatic { /** - * Creates a two dimensional array of an object’s key-value pairs, - * i.e. [[key1, value1], [key2, value2]]. - * @param object The object to inspect. - * @return Aew array of key-value pairs. - **/ - pairs(object: any): any[][]; + * Creates a function that returns the property value at path on a given object. + * + * @param path The path of the property to get. + * @return Returns the new function. + */ + property(path: StringRepresentable|StringRepresentable[]): (obj: TObj) => TResult; } - interface LoDashObjectWrapper { + interface LoDashImplicitWrapper { /** - * @see _.pairs - **/ - pairs(): LoDashArrayWrapper; + * @see _.property + */ + property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; } - //_.picks - interface LoDashStatic { + interface LoDashImplicitArrayWrapper { /** - * Creates a shallow clone of object composed of the specified properties. Property names may be - * specified as individual arguments or as arrays of property names. If a callback is provided - * it will be executed for each property of object picking the properties the callback returns - * truey for. The callback is bound to thisArg and invoked with three arguments; (value, key, - * object). - * @param object Object to strip unwanted key/value pairs. - * @param keys Property names to pick - * @return An object composed of the picked properties. - **/ - pick( - object: T, - ...keys: string[]): Picked; + * @see _.property + */ + property(): LoDashImplicitObjectWrapper<(obj: TObj) => TResult>; + } + interface LoDashExplicitWrapper { /** - * @see _.pick - **/ - pick( - object: T, - keys: string[]): Picked; + * @see _.property + */ + property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; + } + interface LoDashExplicitArrayWrapper { /** - * @see _.pick - **/ - pick( - object: T, - callback: ObjectIterator, - thisArg?: any): Picked; + * @see _.property + */ + property(): LoDashExplicitObjectWrapper<(obj: TObj) => TResult>; } - //_.transform + //_.propertyOf interface LoDashStatic { /** - * An alternative to _.reduce this method transforms object to a new accumulator object which is - * the result of running each of its elements through a callback, with each callback execution - * potentially mutating the accumulator object. The callback is bound to thisArg and invoked with - * four arguments; (accumulator, value, key, object). Callbacks may exit iteration early by - * explicitly returning false. - * @param collection The collection to iterate over. - * @param callback The function called per iteration. - * @param accumulator The custom accumulator value. - * @param thisArg The this binding of callback. - * @return The accumulated value. - **/ - transform( - collection: Array, - callback: MemoVoidIterator, - accumulator: Acc, - thisArg?: any): Acc; - - /** - * @see _.transform - **/ - transform( - collection: List, - callback: MemoVoidIterator, - accumulator: Acc, - thisArg?: any): Acc; + * The opposite of _.property; this method creates a function that returns the property value at a given path + * on object. + * + * @param object The object to query. + * @return Returns the new function. + */ + propertyOf(object: T): (path: string|string[]) => any; + } + interface LoDashImplicitObjectWrapper { /** - * @see _.transform - **/ - transform( - collection: Dictionary, - callback: MemoVoidIterator, - accumulator: Acc, - thisArg?: any): Acc; + * @see _.propertyOf + */ + propertyOf(): LoDashImplicitObjectWrapper<(path: string|string[]) => any>; + } + interface LoDashExplicitObjectWrapper { /** - * @see _.transform - **/ - transform( - collection: Array, - callback?: MemoVoidIterator, - thisArg?: any): Acc; + * @see _.propertyOf + */ + propertyOf(): LoDashExplicitObjectWrapper<(path: string|string[]) => any>; + } + //_.range + interface LoDashStatic { /** - * @see _.transform - **/ - transform( - collection: List, - callback?: MemoVoidIterator, - thisArg?: any): Acc; + * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end. + * If end is not specified it’s set to start with start then set to 0. If end is less than start a zero-length + * range is created unless a negative step is specified. + * + * @param start The start of the range. + * @param end The end of the range. + * @param step The value to increment or decrement by. + * @return Returns a new range array. + */ + range( + start: number, + end: number, + step?: number + ): number[]; /** - * @see _.transform - **/ - transform( - collection: Dictionary, - callback?: MemoVoidIterator, - thisArg?: any): Acc; + * @see _.range + */ + range( + end: number, + step?: number + ): number[]; } - //_.values - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Creates an array composed of the own enumerable property values of object. - * @param object The object to inspect. - * @return Returns an array of property values. - **/ - values(object: any): any[]; + * @see _.range + */ + range( + end?: number, + step?: number + ): LoDashImplicitArrayWrapper; } - /********** - * String * - **********/ - - interface LoDashStatic { - camelCase(str?: string): string; - capitalize(str?: string): string; - deburr(str?: string): string; - endsWith(str?: string, target?: string, position?: number): boolean; - escape(str?: string): string; - escapeRegExp(str?: string): string; - kebabCase(str?: string): string; - pad(str?: string, length?: number, chars?: string): string; - padLeft(str?: string, length?: number, chars?: string): string; - padRight(str?: string, length?: number, chars?: string): string; - repeat(str?: string, n?: number): string; - snakeCase(str?: string): string; - startCase(str?: string): string; - startsWith(str?: string, target?: string, position?: number): boolean; - trim(str?: string, chars?: string): string; - trimLeft(str?: string, chars?: string): string; - trimRight(str?: string, chars?: string): string; - trunc(str?: string, len?: number): string; - trunc(str?: string, options?: { length?: number; omission?: string; separator?: string }): string; - trunc(str?: string, options?: { length?: number; omission?: string; separator?: RegExp }): string; - words(str?: string, pattern?: string): string[]; - words(str?: string, pattern?: RegExp): string[]; + interface LoDashExplicitWrapper { + /** + * @see _.range + */ + range( + end?: number, + step?: number + ): LoDashExplicitArrayWrapper; } - //_.parseInt + //_.rangeRight interface LoDashStatic { /** - * Converts the given value into an integer of the specified radix. If radix is undefined or 0 a - * radix of 10 is used unless the value is a hexadecimal, in which case a radix of 16 is used. - * - * Note: This method avoids differences in native ES3 and ES5 parseInt implementations. See - * http://es5.github.io/#E. - * @param value The value to parse. - * @param radix The radix used to interpret the value to parse. - * @return The new integer value. - **/ - parseInt(value: string, radix?: number): number; - } + * This method is like `_.range` except that it populates values in + * descending order. + * + * @static + * @memberOf _ + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the new array of numbers. + * @example + * + * _.rangeRight(4); + * // => [3, 2, 1, 0] + * + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] + * + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] + * + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] + * + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] + * + * _.rangeRight(0); + * // => [] + */ + rangeRight( + start: number, + end: number, + step?: number + ): number[]; - /************* - * Utilities * - *************/ - //_.escape - interface LoDashStatic { /** - * Converts the characters &, <, >, ", and ' in string to their corresponding HTML entities. - * @param string The string to escape. - * @return The escaped string. - **/ - escape(str: string): string; + * @see _.rangeRight + */ + rangeRight( + end: number, + step?: number + ): number[]; } - //_.identity - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * This method returns the first argument provided to it. - * @param value Any value. - * @return value. - **/ - identity(value: T): T; + * @see _.rangeRight + */ + rangeRight( + end?: number, + step?: number + ): LoDashImplicitArrayWrapper; } - //_.mixin - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Adds function properties of a source object to the lodash function and chainable wrapper. - * @param object The object of function properties to add to lodash. - **/ - mixin(object: Dictionary<(value: any) => any>): void; + * @see _.rangeRight + */ + rangeRight( + end?: number, + step?: number + ): LoDashExplicitArrayWrapper; } - //_.noConflict + //_.runInContext interface LoDashStatic { /** - * Reverts the '_' variable to its previous value and returns a reference to the lodash function. - * @return The lodash function. - **/ - noConflict(): typeof _; + * Create a new pristine lodash function using the given context object. + * + * @param context The context object. + * @return Returns a new lodash function. + */ + runInContext(context?: Object): typeof _; } - //_.property - interface LoDashStatic { + interface LoDashImplicitObjectWrapper { /** - * # Ⓢ - * Creates a "_.pluck" style function, which returns the key value of a given object. - * @param key (string) - * @return the value of that key on the object - **/ - property(key: string): (obj: T) => RT; + * @see _.runInContext + */ + runInContext(): typeof _; } - //_.random + //_.times interface LoDashStatic { /** - * Produces a random number between min and max (inclusive). If only one argument is provided a - * number between 0 and the given number will be returned. If floating is truey or either min or - * max are floats a floating-point number will be returned instead of an integer. - * @param max The maximum possible value. - * @param floating Specify returning a floating-point number. - * @return A random number. - **/ - random(max: number, floating?: boolean): number; + * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee + * is invoked with one argument; (index). + * + * @param n The number of times to invoke iteratee. + * @param iteratee The function invoked per iteration. + * @return Returns the array of results. + */ + times( + n: number, + iteratee: (num: number) => TResult + ): TResult[]; /** - * @see _.random - * @param min The minimum possible value. - * @return A random number between `min` and `max`. - **/ - random(min: number, max: number, floating?: boolean): number; + * @see _.times + */ + times(n: number): number[]; } - //_.result - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Resolves the value of property on object. If property is a function it will be invoked with - * the this binding of object and its result returned, else the property value is returned. If - * object is falsey then undefined is returned. - * @param object The object to inspect. - * @param property The property to get the value of. - * @return The resolved value. - **/ - result(object: any, property: string): any; - } + * @see _.times + */ + times( + iteratee: (num: number) => TResult + ): TResult[]; - //_.runInContext - interface LoDashStatic { /** - * Create a new lodash function using the given context object. - * @param context The context object - * @returns The lodash function. - **/ - runInContext(context: any): typeof _; + * @see _.times + */ + times(): number[]; } - //_.template - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * A micro-templating method that handles arbitrary delimiters, preserves whitespace, and - * correctly escapes quotes within interpolated code. - * - * Note: In the development build, _.template utilizes sourceURLs for easier debugging. See - * http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * For more information on precompiling templates see: - * http://lodash.com/#custom-builds - * - * For more information on Chrome extension sandboxes see: - * http://developer.chrome.com/stable/extensions/sandboxingEval.html - * @param text The template text. - * @param data The data object used to populate the text. - * @param options The options object. - * @param options.escape The "escape" delimiter. - * @param options.evaluate The "evaluate" delimiter. - * @param options.import An object to import into the template as local variables. - * @param options.interpolate The "interpolate" delimiter. - * @param sourceURL The sourceURL of the template’s compiled source. - * @param variable The data object variable name. - * @return Returns the compiled Lo-Dash HTML template or a TemplateExecutor if no data is passed. - **/ - template( - text: string): TemplateExecutor; + * @see _.times + */ + times( + iteratee: (num: number) => TResult + ): LoDashExplicitArrayWrapper; /** - * @see _.template - **/ - template( - text: string, - data: any, - options?: TemplateSettings, - sourceURL?: string, - variable?: string): any /* string or TemplateExecutor*/; + * @see _.times + */ + times(): LoDashExplicitArrayWrapper; } - interface TemplateExecutor { - (...data: any[]): string; - source: string; + //_.toPath + interface LoDashStatic { + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + * + * var path = ['a', 'b', 'c'], + * newPath = _.toPath(path); + * + * console.log(newPath); + * // => ['a', 'b', 'c'] + * + * console.log(path === newPath); + * // => false + */ + toPath(value: any): string[]; } - //_.times - interface LoDashStatic { + interface LoDashImplicitWrapperBase { /** - * Executes the callback n times, returning an array of the results of each callback execution. - * The callback is bound to thisArg and invoked with one argument; (index). - * @param n The number of times to execute the callback. - * @param callback The function called per iteration. - * @param thisArg The this binding of callback. - **/ - times( - n: number, - callback: (num: number) => TResult, - context?: any): TResult[]; + * @see _.toPath + */ + toPath(): LoDashImplicitWrapper; } - //_.unescape - interface LoDashStatic { + interface LoDashExplicitWrapperBase { /** - * The inverse of _.escape this method converts the HTML entities &, <, >, ", and - * ' in string to their corresponding characters. - * @param string The string to unescape. - * @return The unescaped string. - **/ - unescape( - string: string): string; + * @see _.toPath + */ + toPath(): LoDashExplicitWrapper; } //_.uniqueId interface LoDashStatic { /** - * Generates a unique ID. If prefix is provided the ID will be appended to it. - * @param prefix The value to prefix the ID with. - * @return Returns the unique ID. - **/ + * Generates a unique ID. If prefix is provided the ID is appended to it. + * + * @param prefix The value to prefix the ID with. + * @return Returns the unique ID. + */ uniqueId(prefix?: string): string; } - - //_.noop - interface LoDashStatic { - /** - * A no-operation function. - **/ - noop(): void; - } - //_.constant - interface LoDashStatic { + interface LoDashImplicitWrapper { /** - * Creates a function that returns value.. - **/ - constant(value: T): () => T; + * @see _.uniqueId + */ + uniqueId(): string; } - //_.create - interface LoDashStatic { + interface LoDashExplicitWrapper { /** - * Creates an object that inherits from the given prototype object. If a properties object is provided its own enumerable properties are assigned to the created object. - * @param prototype The object to inherit from. - * @param properties The properties to assign to the object. + * @see _.uniqueId */ - create(prototype: Object, properties?: Object): Object; + uniqueId(): LoDashExplicitWrapper; } - + interface ListIterator { - (value: T, index: number, list: T[]): TResult; + (value: T, index: number, collection: List): TResult; + } + + interface DictionaryIterator { + (value: T, key?: string, collection?: Dictionary): TResult; + } + + interface NumericDictionaryIterator { + (value: T, key?: number, collection?: Dictionary): TResult; } interface ObjectIterator { - (element: T, key: string, list: any): TResult; + (element: T, key?: string, collection?: any): TResult; + } + + interface StringIterator { + (char: string, index?: number, string?: string): TResult; } interface MemoVoidIterator { - (prev: TResult, curr: T, indexOrKey: any, list?: T[]): void; + (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): void; } interface MemoIterator { - (prev: TResult, curr: T, indexOrKey: any, list?: T[]): TResult; + (prev: TResult, curr: T, indexOrKey?: any, list?: T[]): TResult; } - /* - interface MemoListIterator { - (prev: TResult, curr: T, index: number, list?: T[]): TResult; + + interface MemoVoidArrayIterator { + (acc: TResult, curr: T, index?: number, arr?: T[]): void; } - interface MemoObjectIterator { - (prev: TResult, curr: T, index: string, object?: Dictionary): TResult; + interface MemoVoidDictionaryIterator { + (acc: TResult, curr: T, key?: string, dict?: Dictionary): void; } - */ //interface Collection {} @@ -6424,8 +18090,20 @@ declare module _ { interface Dictionary { [index: string]: T; } + + interface NumericDictionary { + [index: number]: T; + } + + interface StringRepresentable { + toString(): string; + } + + interface Cancelable { + cancel(): void; + } } declare module "lodash" { export = _; -} +} \ No newline at end of file