[lodash] Add types for lodash/fp (#23532)

* lodash: _.get should with numeric keys, too.
Also added some better tests.

* lodash: add one more NumericDictionary overload for _.get

* lodash: more reasonable index for _.get tests

* Working on script to generate FP types (for #7896)

* Generate generic args and multiple overloads correctly (ish)

* Cap callback arguments

* Fix ObjectIteratee issue, merge interfaces

* Merge similar overloads

* Read and write definiton files

* Generate definitions for all functions
(still needs some tweaking)

* Add JSDoc comments to the output, fix some bugs

* Fix more fp generation bugs

* Add alias functions and special fp functions

* Fix more fp generation bugs

* Fix more fp generation bugs

* Fix more fp generation bugs

* lodash fp: cap more callbacks, use ReadonlyArray, handle special cases

* Add some tests, fix some bugs

* Remove invalid argument from flatten. Don't curry single argument functions.
But do "convert" them so aliases work.
Also fixed some tests.

* lodash fp: implement more tests, fix more bugs, improve performance

* lodash fp: implement more tests, fix more bugs

* lodash fp: add more tests, fix more bugs

* lodash fp: tests finally pass!

* Remove namespace hack

* lodash: fix tests

* lodash fp: fix lint issues

* lodash: Fix lint issues

* lodash: fix more lint issues

* lodash: make travis happy

* lodash: make travis happy (again)

* Update generate-fp script to work with new folder structure

* Lodash: update fp types after merge

* Lodash: test optimizations

* lodash: simplify some tests to avoid GC error

* lodash: simplify tests even more (and fix bugs)
This commit is contained in:
AJ Richardson
2018-03-22 10:44:42 -07:00
committed by Andy
parent fbbfd7833e
commit 67ff021363
405 changed files with 43339 additions and 12394 deletions
+7 -25
View File
@@ -916,27 +916,15 @@ declare module "../index" {
interface LoDashStatic {
/**
* Flattens a nested array. If isDeep is true the array is recursively flattened, otherwise it’s only
* flattened a single level.
* Flattens `array` a single level deep.
*
* @param array The array to flatten.
* @param isDeep Specify a deep flatten.
* @return Returns the new flattened array.
*/
flatten<T>(array: ListOfRecursiveArraysOrValues<T> | null | undefined, isDeep: boolean): T[];
/**
* @see _.flatten
*/
flatten<T>(array: List<Many<T>> | null | undefined): T[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.flatten
*/
flatten<T>(this: LoDashImplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>, isDeep: boolean): LoDashImplicitWrapper<T[]>;
/**
* @see _.flatten
*/
@@ -944,11 +932,6 @@ declare module "../index" {
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.flatten
*/
flatten<T>(this: LoDashExplicitWrapper<ListOfRecursiveArraysOrValues<T> | null | undefined>, isDeep: boolean): LoDashExplicitWrapper<T[]>;
/**
* @see _.flatten
*/
@@ -1102,8 +1085,7 @@ declare module "../index" {
* 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.
* from the end of `array`.
*
* @category Array
* @param array The array to search.
@@ -1122,7 +1104,7 @@ declare module "../index" {
indexOf<T>(
array: List<T> | null | undefined,
value: T,
fromIndex?: boolean|number
fromIndex?: number
): number;
}
@@ -1133,7 +1115,7 @@ declare module "../index" {
indexOf<T>(
this: LoDashImplicitWrapper<List<T> | null | undefined>,
value: T,
fromIndex?: boolean|number
fromIndex?: number
): number;
}
@@ -1144,7 +1126,7 @@ declare module "../index" {
indexOf<T>(
this: LoDashExplicitWrapper<List<T> | null | undefined>,
value: T,
fromIndex?: boolean|number
fromIndex?: number
): LoDashExplicitWrapper<number>;
}
@@ -3463,7 +3445,7 @@ declare module "../index" {
/**
* @see _.zip
*/
zip<T>(...arrays: Array<List<T> | null | undefined>): (T | undefined)[][];
zip<T>(...arrays: Array<List<T> | null | undefined>): Array<Array<T | undefined>>;
}
interface LoDashImplicitWrapper<TValue> {
@@ -3842,4 +3824,4 @@ declare module "../index" {
...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>
): LoDashExplicitWrapper<TResult[]>;
}
}
}
+8 -8
View File
@@ -516,13 +516,13 @@ declare module "../index" {
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 predicate The function called per iteration.
* @param fromIndex The index to search from.
* @return The found element, else undefined.
**/
* 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 predicate The function called per iteration.
* @param fromIndex The index to search from.
* @return The found element, else undefined.
*/
findLast<T, S extends T>(
collection: List<T> | null | undefined,
predicate: ListIteratorTypeGuard<T, S>,
@@ -2720,4 +2720,4 @@ declare module "../index" {
...iteratees: Array<Many<ObjectIteratee<T>>>
): LoDashExplicitWrapper<Array<T[keyof T]>>;
}
}
}
+8 -2
View File
@@ -1,4 +1,5 @@
import _ = require("../index");
// tslint:disable-next-line:strict-export-declare-modifiers
type GlobalPartial<T> = Partial<T>;
declare module "../index" {
type PartialObject<T> = GlobalPartial<T>;
@@ -86,7 +87,6 @@ declare module "../index" {
templateSettings: TemplateSettings;
}
/**
* By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby
* (ERB). Change the following template settings to use alternative delimiters.
@@ -193,17 +193,23 @@ declare module "../index" {
type StringIterator<TResult> = (char: string, index: number, string: string) => TResult;
/** @deprecated Use MemoVoidArrayIterator or MemoVoidDictionaryIterator instead. */
type MemoVoidIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => void;
/** @deprecated Use MemoListIterator or MemoObjectIterator instead. */
/** @deprecated Use MemoListIterator or MemoObjectIterator instead. */
type MemoIterator<T, TResult> = (prev: TResult, curr: T, indexOrKey: any, list: T[]) => TResult;
type MemoListIterator<T, TResult, TList> = (prev: TResult, curr: T, index: number, list: TList) => TResult;
type MemoObjectIterator<T, TResult, TList> = (prev: TResult, curr: T, key: string, list: TList) => TResult;
type MemoIteratorCapped<T, TResult> = (prev: TResult, curr: T) => TResult;
type MemoIteratorCappedRight<T, TResult> = (curr: T, prev: TResult) => TResult;
type MemoVoidArrayIterator<T, TResult> = (acc: TResult, curr: T, index: number, arr: T[]) => void;
type MemoVoidDictionaryIterator<T, TResult> = (acc: TResult, curr: T, key: string, dict: Dictionary<T>) => void;
type MemoVoidIteratorCapped<T, TResult> = (acc: TResult, curr: T) => void;
type ValueIteratee<T> = ((value: T) => NotVoid) | string | [string, any] | PartialDeep<T>;
type ValueIterateeCustom<T, TResult> = ((value: T) => TResult) | string | [string, any] | PartialDeep<T>;
type ValueIteratorTypeGuard<T, S extends T> = (value: T) => value is S;
type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | string | [string, any] | PartialDeep<T>;
type Comparator<T> = (a: T, b: T) => boolean;
type Comparator2<T1, T2> = (a: T1, b: T2) => boolean;
+1 -1
View File
@@ -24,4 +24,4 @@ declare module "../index" {
*/
now(): LoDashExplicitWrapper<number>;
}
}
}
+50 -50
View File
@@ -667,30 +667,30 @@ declare module "../index" {
// flip
interface LoDashStatic {
/**
* Creates a function that invokes `func` with arguments reversed.
*
* @category Function
* @param func The function to flip arguments for.
* @returns Returns the new function.
* @example
*
* var flipped = _.flip(function() {
* return _.toArray(arguments);
* });
*
* flipped('a', 'b', 'c', 'd');
* // => ['d', 'c', 'b', 'a']
*/
flip<T extends (...args: any[]) => any>(func: T): T;
}
/**
* Creates a function that invokes `func` with arguments reversed.
*
* @category Function
* @param func The function to flip arguments for.
* @returns Returns the new function.
* @example
*
* var flipped = _.flip(function() {
* return _.toArray(arguments);
* });
*
* flipped('a', 'b', 'c', 'd');
* // => ['d', 'c', 'b', 'a']
*/
flip<T extends (...args: any[]) => any>(func: T): T;
}
interface LoDashWrapper<TValue> {
/**
* @see _.flip
*/
flip(): this;
}
interface LoDashWrapper<TValue> {
/**
* @see _.flip
*/
flip(): this;
}
// memoize
@@ -771,34 +771,34 @@ declare module "../index" {
// overArgs
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: (...args: any[]) => any,
...transforms: Array<Many<(...args: any[]) => any>>
): (...args: any[]) => any;
}
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: (...args: any[]) => any,
...transforms: Array<Many<(...args: any[]) => any>>
): (...args: any[]) => any;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.overArgs
*/
overArgs(...transforms: Array<Many<(...args: any[]) => any>>): LoDashImplicitWrapper<(...args: any[]) => any>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.overArgs
*/
overArgs(...transforms: Array<Many<(...args: any[]) => any>>): LoDashImplicitWrapper<(...args: any[]) => any>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.overArgs
*/
overArgs(...transforms: Array<Many<(...args: any[]) => any>>): LoDashExplicitWrapper<(...args: any[]) => any>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.overArgs
*/
overArgs(...transforms: Array<Many<(...args: any[]) => any>>): LoDashExplicitWrapper<(...args: any[]) => any>;
}
// partial
@@ -1364,4 +1364,4 @@ declare module "../index" {
wrapper: (value: TValue, ...args: any[]) => TResult
): LoDashExplicitWrapper<(...args: any[]) => TResult>;
}
}
}
+3 -4
View File
@@ -210,7 +210,6 @@ declare module "../index" {
// conformsTo
interface LoDashStatic {
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
@@ -233,11 +232,11 @@ declare module "../index" {
/**
* @see _.conformsTo
*/
conformsTo<T>(this: LoDashImplicitWrapper<T>, source: ConformsPredicateObject<T>): LoDashExplicitWrapper<boolean>;
conformsTo<T>(this: LoDashExplicitWrapper<T>, source: ConformsPredicateObject<T>): LoDashExplicitWrapper<boolean>;
// Note: we can't use TValue here, because it generates a typescript error when strictFunctionTypes is enabled.
}
type CondPair<T, R> = [(val: T) => boolean, (val: T) => R]
type CondPair<T, R> = [(val: T) => boolean, (val: T) => R];
// eq
@@ -1934,4 +1933,4 @@ declare module "../index" {
*/
toString(value: any): string;
}
}
}
+1 -5
View File
@@ -529,8 +529,4 @@ declare module "../index" {
iteratee?: ((value: T) => number) | string
): LoDashExplicitWrapper<number>;
}
/**********
* Number *
**********/
}
}
+1 -5
View File
@@ -175,8 +175,4 @@ declare module "../index" {
floating?: boolean
): LoDashExplicitWrapper<number>;
}
/**********
* Object *
**********/
}
}
+56 -5
View File
@@ -2281,7 +2281,7 @@ declare module "../index" {
* TODO: This would be better if we had a separate overload for obj: NumericDictionary that returned a NumericDictionary,
* but TypeScript cannot select overload signatures based on number vs string index key type.
*/
mapValues<T, TResult>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, callback: ObjectIterator<Dictionary<T>, TResult>): Dictionary<TResult>;
mapValues<T, TResult>(obj: Dictionary<T> | NumericDictionary<T> | null | undefined, callback: DictionaryIterator<T, TResult>): Dictionary<TResult>;
/**
* @see _.mapValues
@@ -2358,7 +2358,7 @@ declare module "../index" {
*/
mapValues<T, TResult>(
this: LoDashImplicitWrapper<Dictionary<T> | NumericDictionary<T> | null | undefined>,
callback: ObjectIterator<Dictionary<T>, TResult>
callback: DictionaryIterator<T, TResult>
): LoDashImplicitWrapper<Dictionary<TResult>>;
/**
@@ -2454,7 +2454,7 @@ declare module "../index" {
*/
mapValues<T, TResult>(
this: LoDashExplicitWrapper<Dictionary<T> | NumericDictionary<T> | null | undefined>,
callback: ObjectIterator<Dictionary<T>, TResult>
callback: DictionaryIterator<T, TResult>
): LoDashExplicitWrapper<Dictionary<TResult>>;
/**
@@ -2680,6 +2680,10 @@ declare module "../index" {
* @see _.merge
*/
merge<TSource1, TSource2, TSource3, TSource4>(
source1: TSource1,
source2: TSource2,
source3: TSource3,
source4: TSource4
): LoDashExplicitWrapper<TValue & TSource1 & TSource2 & TSource3 & TSource4>;
/**
@@ -2692,7 +2696,7 @@ declare module "../index" {
// mergeWith
type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"]
type MergeWithCustomizer = { bivariantHack(value: any, srcValue: any, key: string, object: any, source: any): any; }["bivariantHack"];
interface LoDashStatic {
/**
@@ -2823,6 +2827,53 @@ declare module "../index" {
): LoDashImplicitWrapper<any>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.mergeWith
*/
mergeWith<TSource>(
source: TSource,
customizer: MergeWithCustomizer
): LoDashExplicitWrapper<TValue & TSource>;
/**
* @see _.mergeWith
*/
mergeWith<TSource1, TSource2>(
source1: TSource1,
source2: TSource2,
customizer: MergeWithCustomizer
): LoDashExplicitWrapper<TValue & TSource1 & TSource2>;
/**
* @see _.mergeWith
*/
mergeWith<TSource1, TSource2, TSource3>(
source1: TSource1,
source2: TSource2,
source3: TSource3,
customizer: MergeWithCustomizer
): LoDashExplicitWrapper<TValue & TSource1 & TSource2 & TSource3>;
/**
* @see _.mergeWith
*/
mergeWith<TSource1, TSource2, TSource3, TSource4>(
source1: TSource1,
source2: TSource2,
source3: TSource3,
source4: TSource4,
customizer: MergeWithCustomizer
): LoDashExplicitWrapper<TValue & TSource1 & TSource2 & TSource3 & TSource4>;
/**
* @see _.mergeWith
*/
mergeWith(
...otherArgs: any[]
): LoDashExplicitWrapper<any>;
}
// omit
interface LoDashStatic {
@@ -3719,4 +3770,4 @@ declare module "../index" {
*/
valuesIn<T extends object>(this: LoDashExplicitWrapper<T | null | undefined>): LoDashExplicitWrapper<Array<T[keyof T]>>;
}
}
}
+1 -1
View File
@@ -195,4 +195,4 @@ declare module "../index" {
*/
thru<TResult>(interceptor: (value: TValue) => TResult): LoDashExplicitWrapper<TResult>;
}
}
}
+1 -1
View File
@@ -1056,4 +1056,4 @@ declare module "../index" {
*/
words(pattern?: string|RegExp): LoDashExplicitWrapper<string[]>;
}
}
}
+10 -2
View File
@@ -584,9 +584,17 @@ declare module "../index" {
* // => [{ 'user': 'fred', 'age': 40 }]
*/
iteratee<TFunction extends (...args: any[]) => any>(
func: TFunction | string | object
func: TFunction
): TFunction;
/**
* @see _.iteratee
*/
// tslint:disable-next-line:unified-signatures Tests fail in TS2.3 if the overloads are joined
iteratee(
func: string | object
): (...args: any[]) => any;
/**
* @see _.iteratee
*/
@@ -1452,4 +1460,4 @@ declare module "../index" {
*/
uniqueId(): LoDashExplicitWrapper<string>;
}
}
}
+790
View File
@@ -0,0 +1,790 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import add = require("./fp/add");
import after = require("./fp/after");
import all = require("./fp/all");
import allPass = require("./fp/allPass");
import always = require("./fp/always");
import any = require("./fp/any");
import anyPass = require("./fp/anyPass");
import apply = require("./fp/apply");
import ary = require("./fp/ary");
import assign = require("./fp/assign");
import assignAll = require("./fp/assignAll");
import assignAllWith = require("./fp/assignAllWith");
import assignIn = require("./fp/assignIn");
import assignInAll = require("./fp/assignInAll");
import assignInAllWith = require("./fp/assignInAllWith");
import assignInWith = require("./fp/assignInWith");
import assignWith = require("./fp/assignWith");
import assoc = require("./fp/assoc");
import assocPath = require("./fp/assocPath");
import at = require("./fp/at");
import attempt = require("./fp/attempt");
import before = require("./fp/before");
import bind = require("./fp/bind");
import bindAll = require("./fp/bindAll");
import bindKey = require("./fp/bindKey");
import camelCase = require("./fp/camelCase");
import capitalize = require("./fp/capitalize");
import castArray = require("./fp/castArray");
import ceil = require("./fp/ceil");
import chunk = require("./fp/chunk");
import clamp = require("./fp/clamp");
import clone = require("./fp/clone");
import cloneDeep = require("./fp/cloneDeep");
import cloneDeepWith = require("./fp/cloneDeepWith");
import cloneWith = require("./fp/cloneWith");
import compact = require("./fp/compact");
import complement = require("./fp/complement");
import compose = require("./fp/compose");
import concat = require("./fp/concat");
import cond = require("./fp/cond");
import conforms = require("./fp/conforms");
import conformsTo = require("./fp/conformsTo");
import constant = require("./fp/constant");
import contains = require("./fp/contains");
import countBy = require("./fp/countBy");
import create = require("./fp/create");
import curry = require("./fp/curry");
import curryN = require("./fp/curryN");
import curryRight = require("./fp/curryRight");
import curryRightN = require("./fp/curryRightN");
import debounce = require("./fp/debounce");
import deburr = require("./fp/deburr");
import defaults = require("./fp/defaults");
import defaultsAll = require("./fp/defaultsAll");
import defaultsDeep = require("./fp/defaultsDeep");
import defaultsDeepAll = require("./fp/defaultsDeepAll");
import defaultTo = require("./fp/defaultTo");
import defer = require("./fp/defer");
import delay = require("./fp/delay");
import difference = require("./fp/difference");
import differenceBy = require("./fp/differenceBy");
import differenceWith = require("./fp/differenceWith");
import dissoc = require("./fp/dissoc");
import dissocPath = require("./fp/dissocPath");
import divide = require("./fp/divide");
import drop = require("./fp/drop");
import dropLast = require("./fp/dropLast");
import dropLastWhile = require("./fp/dropLastWhile");
import dropRight = require("./fp/dropRight");
import dropRightWhile = require("./fp/dropRightWhile");
import dropWhile = require("./fp/dropWhile");
import each = require("./fp/each");
import eachRight = require("./fp/eachRight");
import endsWith = require("./fp/endsWith");
import entries = require("./fp/entries");
import entriesIn = require("./fp/entriesIn");
import eq = require("./fp/eq");
import equals = require("./fp/equals");
import escape = require("./fp/escape");
import escapeRegExp = require("./fp/escapeRegExp");
import every = require("./fp/every");
import extend = require("./fp/extend");
import extendAll = require("./fp/extendAll");
import extendAllWith = require("./fp/extendAllWith");
import extendWith = require("./fp/extendWith");
import F = require("./fp/F");
import fill = require("./fp/fill");
import filter = require("./fp/filter");
import find = require("./fp/find");
import findFrom = require("./fp/findFrom");
import findIndex = require("./fp/findIndex");
import findIndexFrom = require("./fp/findIndexFrom");
import findKey = require("./fp/findKey");
import findLast = require("./fp/findLast");
import findLastFrom = require("./fp/findLastFrom");
import findLastIndex = require("./fp/findLastIndex");
import findLastIndexFrom = require("./fp/findLastIndexFrom");
import findLastKey = require("./fp/findLastKey");
import first = require("./fp/first");
import flatMap = require("./fp/flatMap");
import flatMapDeep = require("./fp/flatMapDeep");
import flatMapDepth = require("./fp/flatMapDepth");
import flatten = require("./fp/flatten");
import flattenDeep = require("./fp/flattenDeep");
import flattenDepth = require("./fp/flattenDepth");
import flip = require("./fp/flip");
import floor = require("./fp/floor");
import flow = require("./fp/flow");
import flowRight = require("./fp/flowRight");
import forEach = require("./fp/forEach");
import forEachRight = require("./fp/forEachRight");
import forIn = require("./fp/forIn");
import forInRight = require("./fp/forInRight");
import forOwn = require("./fp/forOwn");
import forOwnRight = require("./fp/forOwnRight");
import fromPairs = require("./fp/fromPairs");
import functions = require("./fp/functions");
import functionsIn = require("./fp/functionsIn");
import get = require("./fp/get");
import getOr = require("./fp/getOr");
import groupBy = require("./fp/groupBy");
import gt = require("./fp/gt");
import gte = require("./fp/gte");
import has = require("./fp/has");
import hasIn = require("./fp/hasIn");
import head = require("./fp/head");
import identical = require("./fp/identical");
import identity = require("./fp/identity");
import includes = require("./fp/includes");
import includesFrom = require("./fp/includesFrom");
import indexBy = require("./fp/indexBy");
import indexOf = require("./fp/indexOf");
import indexOfFrom = require("./fp/indexOfFrom");
import init = require("./fp/init");
import initial = require("./fp/initial");
import inRange = require("./fp/inRange");
import intersection = require("./fp/intersection");
import intersectionBy = require("./fp/intersectionBy");
import intersectionWith = require("./fp/intersectionWith");
import invert = require("./fp/invert");
import invertBy = require("./fp/invertBy");
import invertObj = require("./fp/invertObj");
import invoke = require("./fp/invoke");
import invokeArgs = require("./fp/invokeArgs");
import invokeArgsMap = require("./fp/invokeArgsMap");
import invokeMap = require("./fp/invokeMap");
import isArguments = require("./fp/isArguments");
import isArray = require("./fp/isArray");
import isArrayBuffer = require("./fp/isArrayBuffer");
import isArrayLike = require("./fp/isArrayLike");
import isArrayLikeObject = require("./fp/isArrayLikeObject");
import isBoolean = require("./fp/isBoolean");
import isBuffer = require("./fp/isBuffer");
import isDate = require("./fp/isDate");
import isElement = require("./fp/isElement");
import isEmpty = require("./fp/isEmpty");
import isEqual = require("./fp/isEqual");
import isEqualWith = require("./fp/isEqualWith");
import isError = require("./fp/isError");
import isFinite = require("./fp/isFinite");
import isFunction = require("./fp/isFunction");
import isInteger = require("./fp/isInteger");
import isLength = require("./fp/isLength");
import isMap = require("./fp/isMap");
import isMatch = require("./fp/isMatch");
import isMatchWith = require("./fp/isMatchWith");
import isNaN = require("./fp/isNaN");
import isNative = require("./fp/isNative");
import isNil = require("./fp/isNil");
import isNull = require("./fp/isNull");
import isNumber = require("./fp/isNumber");
import isObject = require("./fp/isObject");
import isObjectLike = require("./fp/isObjectLike");
import isPlainObject = require("./fp/isPlainObject");
import isRegExp = require("./fp/isRegExp");
import isSafeInteger = require("./fp/isSafeInteger");
import isSet = require("./fp/isSet");
import isString = require("./fp/isString");
import isSymbol = require("./fp/isSymbol");
import isTypedArray = require("./fp/isTypedArray");
import isUndefined = require("./fp/isUndefined");
import isWeakMap = require("./fp/isWeakMap");
import isWeakSet = require("./fp/isWeakSet");
import iteratee = require("./fp/iteratee");
import join = require("./fp/join");
import juxt = require("./fp/juxt");
import kebabCase = require("./fp/kebabCase");
import keyBy = require("./fp/keyBy");
import keys = require("./fp/keys");
import keysIn = require("./fp/keysIn");
import last = require("./fp/last");
import lastIndexOf = require("./fp/lastIndexOf");
import lastIndexOfFrom = require("./fp/lastIndexOfFrom");
import lowerCase = require("./fp/lowerCase");
import lowerFirst = require("./fp/lowerFirst");
import lt = require("./fp/lt");
import lte = require("./fp/lte");
import map = require("./fp/map");
import mapKeys = require("./fp/mapKeys");
import mapValues = require("./fp/mapValues");
import matches = require("./fp/matches");
import matchesProperty = require("./fp/matchesProperty");
import max = require("./fp/max");
import maxBy = require("./fp/maxBy");
import mean = require("./fp/mean");
import meanBy = require("./fp/meanBy");
import memoize = require("./fp/memoize");
import merge = require("./fp/merge");
import mergeAll = require("./fp/mergeAll");
import mergeAllWith = require("./fp/mergeAllWith");
import mergeWith = require("./fp/mergeWith");
import method = require("./fp/method");
import methodOf = require("./fp/methodOf");
import min = require("./fp/min");
import minBy = require("./fp/minBy");
import multiply = require("./fp/multiply");
import nAry = require("./fp/nAry");
import negate = require("./fp/negate");
import noConflict = require("./fp/noConflict");
import noop = require("./fp/noop");
import now = require("./fp/now");
import nth = require("./fp/nth");
import nthArg = require("./fp/nthArg");
import omit = require("./fp/omit");
import omitAll = require("./fp/omitAll");
import omitBy = require("./fp/omitBy");
import once = require("./fp/once");
import orderBy = require("./fp/orderBy");
import over = require("./fp/over");
import overArgs = require("./fp/overArgs");
import overEvery = require("./fp/overEvery");
import overSome = require("./fp/overSome");
import pad = require("./fp/pad");
import padChars = require("./fp/padChars");
import padCharsEnd = require("./fp/padCharsEnd");
import padCharsStart = require("./fp/padCharsStart");
import padEnd = require("./fp/padEnd");
import padStart = require("./fp/padStart");
import parseInt = require("./fp/parseInt");
import partial = require("./fp/partial");
import partialRight = require("./fp/partialRight");
import partition = require("./fp/partition");
import path = require("./fp/path");
import pathEq = require("./fp/pathEq");
import pathOr = require("./fp/pathOr");
import paths = require("./fp/paths");
import pick = require("./fp/pick");
import pickAll = require("./fp/pickAll");
import pickBy = require("./fp/pickBy");
import pipe = require("./fp/pipe");
import pluck = require("./fp/pluck");
import prop = require("./fp/prop");
import propEq = require("./fp/propEq");
import property = require("./fp/property");
import propertyOf = require("./fp/propertyOf");
import propOr = require("./fp/propOr");
import props = require("./fp/props");
import pull = require("./fp/pull");
import pullAll = require("./fp/pullAll");
import pullAllBy = require("./fp/pullAllBy");
import pullAllWith = require("./fp/pullAllWith");
import pullAt = require("./fp/pullAt");
import random = require("./fp/random");
import range = require("./fp/range");
import rangeRight = require("./fp/rangeRight");
import rangeStep = require("./fp/rangeStep");
import rangeStepRight = require("./fp/rangeStepRight");
import rearg = require("./fp/rearg");
import reduce = require("./fp/reduce");
import reduceRight = require("./fp/reduceRight");
import reject = require("./fp/reject");
import remove = require("./fp/remove");
import repeat = require("./fp/repeat");
import replace = require("./fp/replace");
import rest = require("./fp/rest");
import restFrom = require("./fp/restFrom");
import result = require("./fp/result");
import reverse = require("./fp/reverse");
import round = require("./fp/round");
import runInContext = require("./fp/runInContext");
import sample = require("./fp/sample");
import sampleSize = require("./fp/sampleSize");
import set = require("./fp/set");
import setWith = require("./fp/setWith");
import shuffle = require("./fp/shuffle");
import size = require("./fp/size");
import slice = require("./fp/slice");
import snakeCase = require("./fp/snakeCase");
import some = require("./fp/some");
import sortBy = require("./fp/sortBy");
import sortedIndex = require("./fp/sortedIndex");
import sortedIndexBy = require("./fp/sortedIndexBy");
import sortedIndexOf = require("./fp/sortedIndexOf");
import sortedLastIndex = require("./fp/sortedLastIndex");
import sortedLastIndexBy = require("./fp/sortedLastIndexBy");
import sortedLastIndexOf = require("./fp/sortedLastIndexOf");
import sortedUniq = require("./fp/sortedUniq");
import sortedUniqBy = require("./fp/sortedUniqBy");
import split = require("./fp/split");
import spread = require("./fp/spread");
import spreadFrom = require("./fp/spreadFrom");
import startCase = require("./fp/startCase");
import startsWith = require("./fp/startsWith");
import stubArray = require("./fp/stubArray");
import stubFalse = require("./fp/stubFalse");
import stubObject = require("./fp/stubObject");
import stubString = require("./fp/stubString");
import stubTrue = require("./fp/stubTrue");
import subtract = require("./fp/subtract");
import sum = require("./fp/sum");
import sumBy = require("./fp/sumBy");
import symmetricDifference = require("./fp/symmetricDifference");
import symmetricDifferenceBy = require("./fp/symmetricDifferenceBy");
import symmetricDifferenceWith = require("./fp/symmetricDifferenceWith");
import T = require("./fp/T");
import tail = require("./fp/tail");
import take = require("./fp/take");
import takeLast = require("./fp/takeLast");
import takeLastWhile = require("./fp/takeLastWhile");
import takeRight = require("./fp/takeRight");
import takeRightWhile = require("./fp/takeRightWhile");
import takeWhile = require("./fp/takeWhile");
import tap = require("./fp/tap");
import template = require("./fp/template");
import throttle = require("./fp/throttle");
import thru = require("./fp/thru");
import times = require("./fp/times");
import toArray = require("./fp/toArray");
import toFinite = require("./fp/toFinite");
import toInteger = require("./fp/toInteger");
import toLength = require("./fp/toLength");
import toLower = require("./fp/toLower");
import toNumber = require("./fp/toNumber");
import toPairs = require("./fp/toPairs");
import toPairsIn = require("./fp/toPairsIn");
import toPath = require("./fp/toPath");
import toPlainObject = require("./fp/toPlainObject");
import toSafeInteger = require("./fp/toSafeInteger");
import toString = require("./fp/toString");
import toUpper = require("./fp/toUpper");
import transform = require("./fp/transform");
import trim = require("./fp/trim");
import trimChars = require("./fp/trimChars");
import trimCharsEnd = require("./fp/trimCharsEnd");
import trimCharsStart = require("./fp/trimCharsStart");
import trimEnd = require("./fp/trimEnd");
import trimStart = require("./fp/trimStart");
import truncate = require("./fp/truncate");
import unapply = require("./fp/unapply");
import unary = require("./fp/unary");
import unescape = require("./fp/unescape");
import union = require("./fp/union");
import unionBy = require("./fp/unionBy");
import unionWith = require("./fp/unionWith");
import uniq = require("./fp/uniq");
import uniqBy = require("./fp/uniqBy");
import uniqueId = require("./fp/uniqueId");
import uniqWith = require("./fp/uniqWith");
import unnest = require("./fp/unnest");
import unset = require("./fp/unset");
import unzip = require("./fp/unzip");
import unzipWith = require("./fp/unzipWith");
import update = require("./fp/update");
import updateWith = require("./fp/updateWith");
import upperCase = require("./fp/upperCase");
import upperFirst = require("./fp/upperFirst");
import useWith = require("./fp/useWith");
import values = require("./fp/values");
import valuesIn = require("./fp/valuesIn");
import where = require("./fp/where");
import whereEq = require("./fp/whereEq");
import without = require("./fp/without");
import words = require("./fp/words");
import wrap = require("./fp/wrap");
import xor = require("./fp/xor");
import xorBy = require("./fp/xorBy");
import xorWith = require("./fp/xorWith");
import zip = require("./fp/zip");
import zipAll = require("./fp/zipAll");
import zipObj = require("./fp/zipObj");
import zipObject = require("./fp/zipObject");
import zipObjectDeep = require("./fp/zipObjectDeep");
import zipWith = require("./fp/zipWith");
export = _;
declare const _: _.LoDashFp;
declare namespace _ {
interface LoDashFp {
add: typeof add;
after: typeof after;
all: typeof all;
allPass: typeof allPass;
always: typeof always;
any: typeof any;
anyPass: typeof anyPass;
apply: typeof apply;
ary: typeof ary;
assign: typeof assign;
assignAll: typeof assignAll;
assignAllWith: typeof assignAllWith;
assignIn: typeof assignIn;
assignInAll: typeof assignInAll;
assignInAllWith: typeof assignInAllWith;
assignInWith: typeof assignInWith;
assignWith: typeof assignWith;
assoc: typeof assoc;
assocPath: typeof assocPath;
at: typeof at;
attempt: typeof attempt;
before: typeof before;
bind: typeof bind;
bindAll: typeof bindAll;
bindKey: typeof bindKey;
camelCase: typeof camelCase;
capitalize: typeof capitalize;
castArray: typeof castArray;
ceil: typeof ceil;
chunk: typeof chunk;
clamp: typeof clamp;
clone: typeof clone;
cloneDeep: typeof cloneDeep;
cloneDeepWith: typeof cloneDeepWith;
cloneWith: typeof cloneWith;
compact: typeof compact;
complement: typeof complement;
compose: typeof compose;
concat: typeof concat;
cond: typeof cond;
conforms: typeof conforms;
conformsTo: typeof conformsTo;
constant: typeof constant;
contains: typeof contains;
countBy: typeof countBy;
create: typeof create;
curry: typeof curry;
curryN: typeof curryN;
curryRight: typeof curryRight;
curryRightN: typeof curryRightN;
debounce: typeof debounce;
deburr: typeof deburr;
defaults: typeof defaults;
defaultsAll: typeof defaultsAll;
defaultsDeep: typeof defaultsDeep;
defaultsDeepAll: typeof defaultsDeepAll;
defaultTo: typeof defaultTo;
defer: typeof defer;
delay: typeof delay;
difference: typeof difference;
differenceBy: typeof differenceBy;
differenceWith: typeof differenceWith;
dissoc: typeof dissoc;
dissocPath: typeof dissocPath;
divide: typeof divide;
drop: typeof drop;
dropLast: typeof dropLast;
dropLastWhile: typeof dropLastWhile;
dropRight: typeof dropRight;
dropRightWhile: typeof dropRightWhile;
dropWhile: typeof dropWhile;
each: typeof each;
eachRight: typeof eachRight;
endsWith: typeof endsWith;
entries: typeof entries;
entriesIn: typeof entriesIn;
eq: typeof eq;
equals: typeof equals;
escape: typeof escape;
escapeRegExp: typeof escapeRegExp;
every: typeof every;
extend: typeof extend;
extendAll: typeof extendAll;
extendAllWith: typeof extendAllWith;
extendWith: typeof extendWith;
F: typeof F;
fill: typeof fill;
filter: typeof filter;
find: typeof find;
findFrom: typeof findFrom;
findIndex: typeof findIndex;
findIndexFrom: typeof findIndexFrom;
findKey: typeof findKey;
findLast: typeof findLast;
findLastFrom: typeof findLastFrom;
findLastIndex: typeof findLastIndex;
findLastIndexFrom: typeof findLastIndexFrom;
findLastKey: typeof findLastKey;
first: typeof first;
flatMap: typeof flatMap;
flatMapDeep: typeof flatMapDeep;
flatMapDepth: typeof flatMapDepth;
flatten: typeof flatten;
flattenDeep: typeof flattenDeep;
flattenDepth: typeof flattenDepth;
flip: typeof flip;
floor: typeof floor;
flow: typeof flow;
flowRight: typeof flowRight;
forEach: typeof forEach;
forEachRight: typeof forEachRight;
forIn: typeof forIn;
forInRight: typeof forInRight;
forOwn: typeof forOwn;
forOwnRight: typeof forOwnRight;
fromPairs: typeof fromPairs;
functions: typeof functions;
functionsIn: typeof functionsIn;
get: typeof get;
getOr: typeof getOr;
groupBy: typeof groupBy;
gt: typeof gt;
gte: typeof gte;
has: typeof has;
hasIn: typeof hasIn;
head: typeof head;
identical: typeof identical;
identity: typeof identity;
includes: typeof includes;
includesFrom: typeof includesFrom;
indexBy: typeof indexBy;
indexOf: typeof indexOf;
indexOfFrom: typeof indexOfFrom;
init: typeof init;
initial: typeof initial;
inRange: typeof inRange;
intersection: typeof intersection;
intersectionBy: typeof intersectionBy;
intersectionWith: typeof intersectionWith;
invert: typeof invert;
invertBy: typeof invertBy;
invertObj: typeof invertObj;
invoke: typeof invoke;
invokeArgs: typeof invokeArgs;
invokeArgsMap: typeof invokeArgsMap;
invokeMap: typeof invokeMap;
isArguments: typeof isArguments;
isArray: typeof isArray;
isArrayBuffer: typeof isArrayBuffer;
isArrayLike: typeof isArrayLike;
isArrayLikeObject: typeof isArrayLikeObject;
isBoolean: typeof isBoolean;
isBuffer: typeof isBuffer;
isDate: typeof isDate;
isElement: typeof isElement;
isEmpty: typeof isEmpty;
isEqual: typeof isEqual;
isEqualWith: typeof isEqualWith;
isError: typeof isError;
isFinite: typeof isFinite;
isFunction: typeof isFunction;
isInteger: typeof isInteger;
isLength: typeof isLength;
isMap: typeof isMap;
isMatch: typeof isMatch;
isMatchWith: typeof isMatchWith;
isNaN: typeof isNaN;
isNative: typeof isNative;
isNil: typeof isNil;
isNull: typeof isNull;
isNumber: typeof isNumber;
isObject: typeof isObject;
isObjectLike: typeof isObjectLike;
isPlainObject: typeof isPlainObject;
isRegExp: typeof isRegExp;
isSafeInteger: typeof isSafeInteger;
isSet: typeof isSet;
isString: typeof isString;
isSymbol: typeof isSymbol;
isTypedArray: typeof isTypedArray;
isUndefined: typeof isUndefined;
isWeakMap: typeof isWeakMap;
isWeakSet: typeof isWeakSet;
iteratee: typeof iteratee;
join: typeof join;
juxt: typeof juxt;
kebabCase: typeof kebabCase;
keyBy: typeof keyBy;
keys: typeof keys;
keysIn: typeof keysIn;
last: typeof last;
lastIndexOf: typeof lastIndexOf;
lastIndexOfFrom: typeof lastIndexOfFrom;
lowerCase: typeof lowerCase;
lowerFirst: typeof lowerFirst;
lt: typeof lt;
lte: typeof lte;
map: typeof map;
mapKeys: typeof mapKeys;
mapValues: typeof mapValues;
matches: typeof matches;
matchesProperty: typeof matchesProperty;
max: typeof max;
maxBy: typeof maxBy;
mean: typeof mean;
meanBy: typeof meanBy;
memoize: typeof memoize;
merge: typeof merge;
mergeAll: typeof mergeAll;
mergeAllWith: typeof mergeAllWith;
mergeWith: typeof mergeWith;
method: typeof method;
methodOf: typeof methodOf;
min: typeof min;
minBy: typeof minBy;
multiply: typeof multiply;
nAry: typeof nAry;
negate: typeof negate;
noConflict: typeof noConflict;
noop: typeof noop;
now: typeof now;
nth: typeof nth;
nthArg: typeof nthArg;
omit: typeof omit;
omitAll: typeof omitAll;
omitBy: typeof omitBy;
once: typeof once;
orderBy: typeof orderBy;
over: typeof over;
overArgs: typeof overArgs;
overEvery: typeof overEvery;
overSome: typeof overSome;
pad: typeof pad;
padChars: typeof padChars;
padCharsEnd: typeof padCharsEnd;
padCharsStart: typeof padCharsStart;
padEnd: typeof padEnd;
padStart: typeof padStart;
parseInt: typeof parseInt;
partial: typeof partial;
partialRight: typeof partialRight;
partition: typeof partition;
path: typeof path;
pathEq: typeof pathEq;
pathOr: typeof pathOr;
paths: typeof paths;
pick: typeof pick;
pickAll: typeof pickAll;
pickBy: typeof pickBy;
pipe: typeof pipe;
pluck: typeof pluck;
prop: typeof prop;
propEq: typeof propEq;
property: typeof property;
propertyOf: typeof propertyOf;
propOr: typeof propOr;
props: typeof props;
pull: typeof pull;
pullAll: typeof pullAll;
pullAllBy: typeof pullAllBy;
pullAllWith: typeof pullAllWith;
pullAt: typeof pullAt;
random: typeof random;
range: typeof range;
rangeRight: typeof rangeRight;
rangeStep: typeof rangeStep;
rangeStepRight: typeof rangeStepRight;
rearg: typeof rearg;
reduce: typeof reduce;
reduceRight: typeof reduceRight;
reject: typeof reject;
remove: typeof remove;
repeat: typeof repeat;
replace: typeof replace;
rest: typeof rest;
restFrom: typeof restFrom;
result: typeof result;
reverse: typeof reverse;
round: typeof round;
runInContext: typeof runInContext;
sample: typeof sample;
sampleSize: typeof sampleSize;
set: typeof set;
setWith: typeof setWith;
shuffle: typeof shuffle;
size: typeof size;
slice: typeof slice;
snakeCase: typeof snakeCase;
some: typeof some;
sortBy: typeof sortBy;
sortedIndex: typeof sortedIndex;
sortedIndexBy: typeof sortedIndexBy;
sortedIndexOf: typeof sortedIndexOf;
sortedLastIndex: typeof sortedLastIndex;
sortedLastIndexBy: typeof sortedLastIndexBy;
sortedLastIndexOf: typeof sortedLastIndexOf;
sortedUniq: typeof sortedUniq;
sortedUniqBy: typeof sortedUniqBy;
split: typeof split;
spread: typeof spread;
spreadFrom: typeof spreadFrom;
startCase: typeof startCase;
startsWith: typeof startsWith;
stubArray: typeof stubArray;
stubFalse: typeof stubFalse;
stubObject: typeof stubObject;
stubString: typeof stubString;
stubTrue: typeof stubTrue;
subtract: typeof subtract;
sum: typeof sum;
sumBy: typeof sumBy;
symmetricDifference: typeof symmetricDifference;
symmetricDifferenceBy: typeof symmetricDifferenceBy;
symmetricDifferenceWith: typeof symmetricDifferenceWith;
T: typeof T;
tail: typeof tail;
take: typeof take;
takeLast: typeof takeLast;
takeLastWhile: typeof takeLastWhile;
takeRight: typeof takeRight;
takeRightWhile: typeof takeRightWhile;
takeWhile: typeof takeWhile;
tap: typeof tap;
template: typeof template;
throttle: typeof throttle;
thru: typeof thru;
times: typeof times;
toArray: typeof toArray;
toFinite: typeof toFinite;
toInteger: typeof toInteger;
toLength: typeof toLength;
toLower: typeof toLower;
toNumber: typeof toNumber;
toPairs: typeof toPairs;
toPairsIn: typeof toPairsIn;
toPath: typeof toPath;
toPlainObject: typeof toPlainObject;
toSafeInteger: typeof toSafeInteger;
toString: typeof toString;
toUpper: typeof toUpper;
transform: typeof transform;
trim: typeof trim;
trimChars: typeof trimChars;
trimCharsEnd: typeof trimCharsEnd;
trimCharsStart: typeof trimCharsStart;
trimEnd: typeof trimEnd;
trimStart: typeof trimStart;
truncate: typeof truncate;
unapply: typeof unapply;
unary: typeof unary;
unescape: typeof unescape;
union: typeof union;
unionBy: typeof unionBy;
unionWith: typeof unionWith;
uniq: typeof uniq;
uniqBy: typeof uniqBy;
uniqueId: typeof uniqueId;
uniqWith: typeof uniqWith;
unnest: typeof unnest;
unset: typeof unset;
unzip: typeof unzip;
unzipWith: typeof unzipWith;
update: typeof update;
updateWith: typeof updateWith;
upperCase: typeof upperCase;
upperFirst: typeof upperFirst;
useWith: typeof useWith;
values: typeof values;
valuesIn: typeof valuesIn;
where: typeof where;
whereEq: typeof whereEq;
without: typeof without;
words: typeof words;
wrap: typeof wrap;
xor: typeof xor;
xorBy: typeof xorBy;
xorWith: typeof xorWith;
zip: typeof zip;
zipAll: typeof zipAll;
zipObj: typeof zipObj;
zipObject: typeof zipObject;
zipObjectDeep: typeof zipObjectDeep;
zipWith: typeof zipWith;
}
}
// Backward compatibility with --target es5
declare global {
// tslint:disable-next-line:no-empty-interface
interface Set<T> { }
// tslint:disable-next-line:no-empty-interface
interface Map<K, V> { }
// tslint:disable-next-line:no-empty-interface
interface WeakSet<T> { }
// tslint:disable-next-line:no-empty-interface
interface WeakMap<K extends object, V> { }
}
+14
View File
@@ -0,0 +1,14 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type StubFalse =
/**
* This method returns `false`.
*
* @returns Returns `false`.
*/
() => boolean;
declare const F: StubFalse;
export = F;
+14
View File
@@ -0,0 +1,14 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type StubTrue =
/**
* This method returns `true`.
*
* @returns Returns `true`.
*/
() => boolean;
declare const T: StubTrue;
export = T;
+51
View File
@@ -0,0 +1,51 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Add {
/**
* Adds two numbers.
*
* @param augend The first number to add.
* @param addend The second number to add.
* @return Returns the sum.
*/
(): Add;
/**
* Adds two numbers.
*
* @param augend The first number to add.
* @param addend The second number to add.
* @return Returns the sum.
*/
(augend: number): Add1x1;
/**
* Adds two numbers.
*
* @param augend The first number to add.
* @param addend The second number to add.
* @return Returns the sum.
*/
(augend: number, addend: number): number;
}
interface Add1x1 {
/**
* Adds two numbers.
*
* @param augend The first number to add.
* @param addend The second number to add.
* @return Returns the sum.
*/
(): Add1x1;
/**
* Adds two numbers.
*
* @param augend The first number to add.
* @param addend The second number to add.
* @return Returns the sum.
*/
(addend: number): number;
}
declare const add: Add;
export = add;
+51
View File
@@ -0,0 +1,51 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface After {
/**
* 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;
/**
* 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.
*/
<TFunc extends (...args: any[]) => any>(func: TFunc): After1x1<TFunc>;
/**
* 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.
*/
<TFunc extends (...args: any[]) => any>(func: TFunc, n: number): TFunc;
}
interface After1x1<TFunc extends (...args: any[]) => any> {
/**
* 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.
*/
(): After1x1<TFunc>;
/**
* 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.
*/
(n: number): TFunc;
}
declare const after: After;
export = after;
+67
View File
@@ -0,0 +1,67 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Every {
/**
* 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;
/**
* 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.
*/
<T>(predicate: _.ValueIterateeCustom<T, boolean>): Every1x1<T>;
/**
* 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.
*/
<T>(predicate: _.ValueIterateeCustom<T, boolean>, collection: _.List<T> | null | undefined): boolean;
/**
* 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.
*/
<T extends object>(predicate: _.ValueIterateeCustom<T[keyof T], boolean>, collection: T | null | undefined): boolean;
}
interface Every1x1<T> {
/**
* 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.
*/
(): Every1x1<T>;
/**
* 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.
*/
(collection: _.List<T> | object | null | undefined): boolean;
}
declare const all: Every;
export = all;
+18
View File
@@ -0,0 +1,18 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
type OverEvery =
/**
* 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.
*/
<T>(predicates: _.Many<(...args: T[]) => boolean>) => (...args: T[]) => boolean;
declare const allPass: OverEvery;
export = allPass;
+15
View File
@@ -0,0 +1,15 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Constant =
/**
* Creates a function that returns value.
*
* @param value The value to return from the new function.
* @return Returns the new function.
*/
<T>(value: T) => () => T;
declare const always: Constant;
export = always;
+67
View File
@@ -0,0 +1,67 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Some {
/**
* 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;
/**
* 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.
*/
<T>(predicate: _.ValueIterateeCustom<T, boolean>): Some1x1<T>;
/**
* 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.
*/
<T>(predicate: _.ValueIterateeCustom<T, boolean>, collection: _.List<T> | null | undefined): boolean;
/**
* 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.
*/
<T extends object>(predicate: _.ValueIterateeCustom<T[keyof T], boolean>, collection: T | null | undefined): boolean;
}
interface Some1x1<T> {
/**
* 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.
*/
(): Some1x1<T>;
/**
* 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.
*/
(collection: _.List<T> | object | null | undefined): boolean;
}
declare const any: Some;
export = any;
+18
View File
@@ -0,0 +1,18 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
type OverSome =
/**
* 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.
*/
<T>(predicates: _.Many<(...args: T[]) => boolean>) => (...args: T[]) => boolean;
declare const anyPass: OverSome;
export = anyPass;
+18
View File
@@ -0,0 +1,18 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Spread =
/**
* 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.
*/
<TResult>(func: (...args: any[]) => TResult) => (...args: any[]) => TResult;
declare const apply: Spread;
export = apply;
+51
View File
@@ -0,0 +1,51 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Ary {
/**
* 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;
/**
* 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.
*/
(n: number): Ary1x1;
/**
* 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.
*/
(n: number, func: (...args: any[]) => any): (...args: any[]) => any;
}
interface Ary1x1 {
/**
* 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.
*/
(): Ary1x1;
/**
* 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.
*/
(func: (...args: any[]) => any): (...args: any[]) => any;
}
declare const ary: Ary;
export = ary;
+156
View File
@@ -0,0 +1,156 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Assign {
/**
* 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).
*
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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;
/**
* 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).
*
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TObject>(object: TObject): Assign1x1<TObject>;
/**
* 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).
*
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
}
interface Assign1x1<TObject> {
/**
* 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).
*
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
(): Assign1x1<TObject>;
/**
* 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).
*
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TSource>(source: TSource): TObject & TSource;
}
declare const assign: Assign;
export = assign;
+37
View File
@@ -0,0 +1,37 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Assign =
/**
* 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).
*
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
(object: ReadonlyArray<any>) => any;
declare const assignAll: Assign;
export = assignAll;
+138
View File
@@ -0,0 +1,138 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface AssignWith {
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(customizer: _.AssignCustomizer): AssignWith1x1;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(customizer: _.AssignCustomizer, args: ReadonlyArray<any>): any;
}
interface AssignWith1x1 {
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(): AssignWith1x1;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(args: ReadonlyArray<any>): any;
}
declare const assignAllWith: AssignWith;
export = assignAllWith;
+151
View File
@@ -0,0 +1,151 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface AssignIn {
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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;
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TObject>(object: TObject): AssignIn1x1<TObject>;
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
}
interface AssignIn1x1<TObject> {
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
(): AssignIn1x1<TObject>;
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TSource>(source: TSource): TObject & TSource;
}
declare const assignIn: AssignIn;
export = assignIn;
+36
View File
@@ -0,0 +1,36 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type AssignIn =
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TResult>(object: ReadonlyArray<any>) => TResult;
declare const assignInAll: AssignIn;
export = assignInAll;
+143
View File
@@ -0,0 +1,143 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface AssignInWith {
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(customizer: _.AssignCustomizer): AssignInWith1x1;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(customizer: _.AssignCustomizer, args: ReadonlyArray<any>): any;
}
interface AssignInWith1x1 {
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(): AssignInWith1x1;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(args: ReadonlyArray<any>): any;
}
declare const assignInAllWith: AssignInWith;
export = assignInAllWith;
+249
View File
@@ -0,0 +1,249 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface AssignInWith {
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(customizer: _.AssignCustomizer): AssignInWith1x1;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TObject>(customizer: _.AssignCustomizer, object: TObject): AssignInWith1x2<TObject>;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TObject, TSource>(customizer: _.AssignCustomizer, object: TObject, source: TSource): TObject & TSource;
}
interface AssignInWith1x1 {
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(): AssignInWith1x1;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TObject>(object: TObject): AssignInWith1x2<TObject>;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
}
interface AssignInWith1x2<TObject> {
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(): AssignInWith1x2<TObject>;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TSource>(source: TSource): TObject & TSource;
}
declare const assignInWith: AssignInWith;
export = assignInWith;
+240
View File
@@ -0,0 +1,240 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface AssignWith {
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(customizer: _.AssignCustomizer): AssignWith1x1;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TObject>(customizer: _.AssignCustomizer, object: TObject): AssignWith1x2<TObject>;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TObject, TSource>(customizer: _.AssignCustomizer, object: TObject, source: TSource): TObject & TSource;
}
interface AssignWith1x1 {
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(): AssignWith1x1;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TObject>(object: TObject): AssignWith1x2<TObject>;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
}
interface AssignWith1x2<TObject> {
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(): AssignWith1x2<TObject>;
/**
* 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`.
*
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
<TSource>(source: TSource): TObject & TSource;
}
declare const assignWith: AssignWith;
export = assignWith;
+147
View File
@@ -0,0 +1,147 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Set {
/**
* 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;
/**
* 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.
*/
(path: _.PropertyPath): Set1x1;
/**
* 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.
*/
(path: _.PropertyPath, value: any): Set1x2;
/**
* 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.
*/
<T extends object>(path: _.PropertyPath, value: any, object: T): T;
/**
* 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.
*/
<TResult>(path: _.PropertyPath, value: any, object: object): TResult;
}
interface Set1x1 {
/**
* 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.
*/
(): Set1x1;
/**
* 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.
*/
(value: any): Set1x2;
/**
* 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.
*/
<T extends object>(value: any, object: T): T;
/**
* 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.
*/
<TResult>(value: any, object: object): TResult;
}
interface Set1x2 {
/**
* 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.
*/
(): Set1x2;
/**
* 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.
*/
<T extends object>(object: T): T;
/**
* 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.
*/
<TResult>(object: object): TResult;
}
declare const assoc: Set;
export = assoc;
+147
View File
@@ -0,0 +1,147 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Set {
/**
* 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;
/**
* 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.
*/
(path: _.PropertyPath): Set1x1;
/**
* 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.
*/
(path: _.PropertyPath, value: any): Set1x2;
/**
* 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.
*/
<T extends object>(path: _.PropertyPath, value: any, object: T): T;
/**
* 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.
*/
<TResult>(path: _.PropertyPath, value: any, object: object): TResult;
}
interface Set1x1 {
/**
* 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.
*/
(): Set1x1;
/**
* 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.
*/
(value: any): Set1x2;
/**
* 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.
*/
<T extends object>(value: any, object: T): T;
/**
* 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.
*/
<TResult>(value: any, object: object): TResult;
}
interface Set1x2 {
/**
* 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.
*/
(): Set1x2;
/**
* 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.
*/
<T extends object>(object: T): T;
/**
* 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.
*/
<TResult>(object: object): TResult;
}
declare const assocPath: Set;
export = assocPath;
+96
View File
@@ -0,0 +1,96 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface At {
/**
* 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 object The object 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;
/**
* 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 object The object 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.
*/
(props: _.PropertyPath): At1x1;
/**
* 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 object The object 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.
*/
<T>(props: _.PropertyPath, object: _.List<T> | _.Dictionary<T> | _.NumericDictionary<T> | null | undefined): T[];
/**
* 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 object The object 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.
*/
<T extends object>(props: _.Many<keyof T>): At2x1<T>;
/**
* 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 object The object 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.
*/
<T extends object>(props: _.Many<keyof T>, object: T | null | undefined): Array<T[keyof T]>;
}
interface At1x1 {
/**
* 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 object The object 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.
*/
(): At1x1;
/**
* 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 object The object 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.
*/
<T>(object: _.List<T> | _.Dictionary<T> | _.NumericDictionary<T> | null | undefined): T[];
}
interface At2x1<T extends object> {
/**
* 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 object The object 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.
*/
(): At2x1<T>;
/**
* 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 object The object 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.
*/
(object: T | null | undefined): Array<T[keyof T]>;
}
declare const at: At;
export = at;
+16
View File
@@ -0,0 +1,16 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Attempt =
/**
* 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.
*/
<TResult>(func: (...args: any[]) => TResult) => TResult|Error;
declare const attempt: Attempt;
export = attempt;
+61
View File
@@ -0,0 +1,61 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Before {
/**
* 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;
/**
* 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.
*/
<TFunc extends (...args: any[]) => any>(func: TFunc): Before1x1<TFunc>;
/**
* 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.
*/
<TFunc extends (...args: any[]) => any>(func: TFunc, n: number): TFunc;
}
interface Before1x1<TFunc extends (...args: any[]) => any> {
/**
* 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.
*/
(): Before1x1<TFunc>;
/**
* 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.
*/
(n: number): TFunc;
}
declare const before: Before;
export = before;
+86
View File
@@ -0,0 +1,86 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Bind {
/**
* 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;
/**
* 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.
*/
(func: (...args: any[]) => any): Bind1x1;
/**
* 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.
*/
(func: (...args: any[]) => any, thisArg: any): (...args: any[]) => any;
}
interface Bind1x1 {
/**
* 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.
*/
(): Bind1x1;
/**
* 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.
*/
(thisArg: any): (...args: any[]) => any;
}
declare const bind: Bind;
export = bind;
+78
View File
@@ -0,0 +1,78 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface BindAll {
/**
* 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;
/**
* 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.
*/
(methodNames: _.Many<string>): BindAll1x1;
/**
* 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.
*/
<T>(methodNames: _.Many<string>, object: T): T;
}
interface BindAll1x1 {
/**
* 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.
*/
(): BindAll1x1;
/**
* 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.
*/
<T>(object: T): T;
}
declare const bindAll: BindAll;
export = bindAll;
+91
View File
@@ -0,0 +1,91 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface BindKey {
/**
* 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;
/**
* 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.
*/
(object: object): BindKey1x1;
/**
* 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.
*/
(object: object, key: string): (...args: any[]) => any;
}
interface BindKey1x1 {
/**
* 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.
*/
(): BindKey1x1;
/**
* 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.
*/
(key: string): (...args: any[]) => any;
}
declare const bindKey: BindKey;
export = bindKey;
+15
View File
@@ -0,0 +1,15 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type CamelCase =
/**
* Converts string to camel case.
*
* @param string The string to convert.
* @return Returns the camel cased string.
*/
(string: string) => string;
declare const camelCase: CamelCase;
export = camelCase;
+15
View File
@@ -0,0 +1,15 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Capitalize =
/**
* 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.
*/
(string: string) => string;
declare const capitalize: Capitalize;
export = capitalize;
+17
View File
@@ -0,0 +1,17 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
type CastArray =
/**
* Casts value as an array if it’s not one.
*
* @param value The value to inspect.
* @return Returns the cast array.
*/
<T>(value: _.Many<T>) => T[];
declare const castArray: CastArray;
export = castArray;
+16
View File
@@ -0,0 +1,16 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Ceil =
/**
* 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.
*/
(n: number) => number;
declare const ceil: Ceil;
export = ceil;
+58
View File
@@ -0,0 +1,58 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Chunk {
/**
* 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;
/**
* 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.
*/
(size: number): Chunk1x1;
/**
* 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.
*/
<T>(size: number, array: _.List<T> | null | undefined): T[][];
}
interface Chunk1x1 {
/**
* 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.
*/
(): Chunk1x1;
/**
* 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.
*/
<T>(array: _.List<T> | null | undefined): T[][];
}
declare const chunk: Chunk;
export = chunk;
+166
View File
@@ -0,0 +1,166 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Clamp {
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(): Clamp;
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(lower: number): Clamp1x1;
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(lower: number, upper: number): Clamp1x2;
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(lower: number, upper: number, number: number): number;
}
interface Clamp1x1 {
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(): Clamp1x1;
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(upper: number): Clamp1x2;
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(upper: number, number: number): number;
}
interface Clamp1x2 {
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(): Clamp1x2;
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @category Number
* @param number The number to clamp.
* @param [lower] The lower bound.
* @param upper The upper bound.
* @returns Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
(number: number): number;
}
declare const clamp: Clamp;
export = clamp;
+20
View File
@@ -0,0 +1,20 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Clone =
/**
* Creates a shallow clone of value.
*
* Note: This method is loosely based on the 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.
*
* @param value The value to clone.
* @return Returns the cloned value.
*/
<T>(value: T) => T;
declare const clone: Clone;
export = clone;
+15
View File
@@ -0,0 +1,15 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type CloneDeep =
/**
* This method is like _.clone except that it recursively clones value.
*
* @param value The value to recursively clone.
* @return Returns the deep cloned value.
*/
<T>(value: T) => T;
declare const cloneDeep: CloneDeep;
export = cloneDeep;
+53
View File
@@ -0,0 +1,53 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface CloneDeepWith {
/**
* This method is like _.cloneWith except that it recursively clones value.
*
* @param value The value to recursively clone.
* @param customizer The function to customize cloning.
* @return Returns the deep cloned value.
*/
(): CloneDeepWith;
/**
* This method is like _.cloneWith except that it recursively clones value.
*
* @param value The value to recursively clone.
* @param customizer The function to customize cloning.
* @return Returns the deep cloned value.
*/
<T>(customizer: _.CloneDeepWithCustomizer<T>): CloneDeepWith1x1<T>;
/**
* This method is like _.cloneWith except that it recursively clones value.
*
* @param value The value to recursively clone.
* @param customizer The function to customize cloning.
* @return Returns the deep cloned value.
*/
<T>(customizer: _.CloneDeepWithCustomizer<T>, value: T): any;
}
interface CloneDeepWith1x1<T> {
/**
* This method is like _.cloneWith except that it recursively clones value.
*
* @param value The value to recursively clone.
* @param customizer The function to customize cloning.
* @return Returns the deep cloned value.
*/
(): CloneDeepWith1x1<T>;
/**
* This method is like _.cloneWith except that it recursively clones value.
*
* @param value The value to recursively clone.
* @param customizer The function to customize cloning.
* @return Returns the deep cloned value.
*/
(value: T): any;
}
declare const cloneDeepWith: CloneDeepWith;
export = cloneDeepWith;
+96
View File
@@ -0,0 +1,96 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface CloneWith {
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
(): CloneWith;
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
<T, TResult extends object | string | number | boolean | null>(customizer: _.CloneWithCustomizer<T, TResult>): CloneWith1x1<T, TResult>;
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
<T, TResult extends object | string | number | boolean | null>(customizer: _.CloneWithCustomizer<T, TResult>, value: T): TResult;
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
<T, TResult>(customizer: _.CloneWithCustomizer<T, TResult | undefined>): CloneWith2x1<T, TResult>;
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
<T, TResult>(customizer: _.CloneWithCustomizer<T, TResult | undefined>, value: T): TResult | T;
}
interface CloneWith1x1<T, TResult extends object | string | number | boolean | null> {
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
(): CloneWith1x1<T, TResult>;
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
(value: T): TResult;
}
interface CloneWith2x1<T, TResult> {
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
(): CloneWith2x1<T, TResult>;
/**
* This method is like _.clone except that it accepts customizer which is invoked to produce the cloned value.
* If customizer returns undefined cloning is handled by the method instead.
*
* @param value The value to clone.
* @param customizer The function to customize cloning.
* @return Returns the cloned value.
*/
(value: T): TResult | T;
}
declare const cloneWith: CloneWith;
export = cloneWith;
+18
View File
@@ -0,0 +1,18 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
type Compact =
/**
* 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 Returns the new array of filtered values.
*/
<T>(array: _.List<T | null | undefined | false | "" | 0> | null | undefined) => T[];
declare const compact: Compact;
export = compact;
+16
View File
@@ -0,0 +1,16 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Negate =
/**
* 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.
*/
<T extends (...args: any[]) => any>(predicate: T) => T;
declare const complement: Negate;
export = complement;
+315
View File
@@ -0,0 +1,315 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface FlowRight {
/**
* 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.
*/
<R2, R1>(f2: (a: R1) => R2, f1: () => R1): () => R2;
/**
* 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.
*/
<R3, R2, R1>(f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R3;
/**
* 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.
*/
<R4, R3, R2, R1>(f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R4;
/**
* 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.
*/
<R5, R4, R3, R2, R1>(f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R5;
/**
* 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.
*/
<R6, R5, R4, R3, R2, R1>(f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R6;
/**
* 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.
*/
<R7, R6, R5, R4, R3, R2, R1>(f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: () => R1): () => R7;
/**
* 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.
*/
<A1, R2, R1>(f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R2;
/**
* 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.
*/
<A1, R3, R2, R1>(f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R3;
/**
* 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.
*/
<A1, R4, R3, R2, R1>(f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R4;
/**
* 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.
*/
<A1, R5, R4, R3, R2, R1>(f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R5;
/**
* 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.
*/
<A1, R6, R5, R4, R3, R2, R1>(f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R6;
/**
* 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.
*/
<A1, R7, R6, R5, R4, R3, R2, R1>(f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1) => R1): (a1: A1) => R7;
/**
* 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.
*/
<A1, A2, R2, R1>(f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R2;
/**
* 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.
*/
<A1, A2, R3, R2, R1>(f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R3;
/**
* 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.
*/
<A1, A2, R4, R3, R2, R1>(f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R4;
/**
* 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.
*/
<A1, A2, R5, R4, R3, R2, R1>(f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R5;
/**
* 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.
*/
<A1, A2, R6, R5, R4, R3, R2, R1>(f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R6;
/**
* 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.
*/
<A1, A2, R7, R6, R5, R4, R3, R2, R1>(f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2) => R1): (a1: A1, a2: A2) => R7;
/**
* 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.
*/
<A1, A2, A3, R2, R1>(f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R2;
/**
* 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.
*/
<A1, A2, A3, R3, R2, R1>(f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R3;
/**
* 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.
*/
<A1, A2, A3, R4, R3, R2, R1>(f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R4;
/**
* 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.
*/
<A1, A2, A3, R5, R4, R3, R2, R1>(f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R5;
/**
* 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.
*/
<A1, A2, A3, R6, R5, R4, R3, R2, R1>(f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R6;
/**
* 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.
*/
<A1, A2, A3, R7, R6, R5, R4, R3, R2, R1>(f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3) => R1): (a1: A1, a2: A2, a3: A3) => R7;
/**
* 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.
*/
<A1, A2, A3, A4, R2, R1>(f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R2;
/**
* 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.
*/
<A1, A2, A3, A4, R3, R2, R1>(f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R3;
/**
* 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.
*/
<A1, A2, A3, A4, R4, R3, R2, R1>(f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R4;
/**
* 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.
*/
<A1, A2, A3, A4, R5, R4, R3, R2, R1>(f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R5;
/**
* 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.
*/
<A1, A2, A3, A4, R6, R5, R4, R3, R2, R1>(f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R6;
/**
* 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.
*/
<A1, A2, A3, A4, R7, R6, R5, R4, R3, R2, R1>(f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (a1: A1, a2: A2, a3: A3, a4: A4) => R1): (a1: A1, a2: A2, a3: A3, a4: A4) => R7;
/**
* 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.
*/
<R2, R1>(f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R2;
/**
* 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.
*/
<R3, R2, R1>(f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R3;
/**
* 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.
*/
<R4, R3, R2, R1>(f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R4;
/**
* 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.
*/
<R5, R4, R3, R2, R1>(f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R5;
/**
* 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.
*/
<R6, R5, R4, R3, R2, R1>(f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R6;
/**
* 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.
*/
<R7, R6, R5, R4, R3, R2, R1>(f7: (a: R6) => R7, f6: (a: R5) => R6, f5: (a: R4) => R5, f4: (a: R3) => R4, f3: (a: R2) => R3, f2: (a: R1) => R2, f1: (...args: any[]) => R1): (...args: any[]) => R7;
/**
* 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.
*/
(f7: (a: any) => any, f6: (a: any) => any, f5: (a: any) => any, f4: (a: any) => any, f3: (a: any) => any, f2: (a: any) => any, f1: () => any, ...funcs: Array<_.Many<(...args: any[]) => any>>): (...args: any[]) => any;
/**
* 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.
*/
(funcs: Array<_.Many<(...args: any[]) => any>>): (...args: any[]) => any;
}
declare const compose: FlowRight;
export = compose;
+113
View File
@@ -0,0 +1,113 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Concat {
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @category Array
* @param array The array to concatenate.
* @param [values] The values to concatenate.
* @returns 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]
*/
(): Concat;
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @category Array
* @param array The array to concatenate.
* @param [values] The values to concatenate.
* @returns 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]
*/
<T>(array: _.Many<T>): Concat1x1<T>;
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @category Array
* @param array The array to concatenate.
* @param [values] The values to concatenate.
* @returns 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]
*/
<T>(array: _.Many<T>, values: _.Many<T>): T[];
}
interface Concat1x1<T> {
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @category Array
* @param array The array to concatenate.
* @param [values] The values to concatenate.
* @returns 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]
*/
(): Concat1x1<T>;
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @category Array
* @param array The array to concatenate.
* @param [values] The values to concatenate.
* @returns 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]
*/
(values: _.Many<T>): T[];
}
declare const concat: Concat;
export = concat;
+38
View File
@@ -0,0 +1,38 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
type Cond =
/**
* Creates a function that iterates over `pairs` and invokes the corresponding
* function of the first predicate to return truthy. The predicate-function
* pairs are invoked with the `this` binding and arguments of the created
* function.
*
* @since 4.0.0
* @category Util
* @param pairs The predicate-function pairs.
* @returns Returns the new composite function.
* @example
*
* var func = _.cond([
* [_.matches({ 'a': 1 }), _.constant('matches A')],
* [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
* [_.stubTrue, _.constant('no match')]
* ]);
*
* func({ 'a': 1, 'b': 2 });
* // => 'matches A'
*
* func({ 'a': 0, 'b': 1 });
* // => 'matches B'
*
* func({ 'a': '1', 'b': '2' });
* // => 'no match'
*/
<T, R>(pairs: Array<_.CondPair<T, R>>) => (Target: T) => R;
declare const cond: Cond;
export = cond;
+48
View File
@@ -0,0 +1,48 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface ConformsTo {
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
(): ConformsTo;
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
<T>(source: _.ConformsPredicateObject<T>): ConformsTo1x1<T>;
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
<T>(source: _.ConformsPredicateObject<T>, object: T): boolean;
}
interface ConformsTo1x1<T> {
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
(): ConformsTo1x1<T>;
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
(object: T): boolean;
}
declare const conforms: ConformsTo;
export = conforms;
+48
View File
@@ -0,0 +1,48 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface ConformsTo {
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
(): ConformsTo;
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
<T>(source: _.ConformsPredicateObject<T>): ConformsTo1x1<T>;
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
<T>(source: _.ConformsPredicateObject<T>, object: T): boolean;
}
interface ConformsTo1x1<T> {
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
(): ConformsTo1x1<T>;
/**
* Checks if object conforms to source by invoking the predicate properties of source with the
* corresponding property values of object.
*
* Note: This method is equivalent to _.conforms when source is partially applied.
*/
(object: T): boolean;
}
declare const conformsTo: ConformsTo;
export = conformsTo;
+15
View File
@@ -0,0 +1,15 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Constant =
/**
* Creates a function that returns value.
*
* @param value The value to return from the new function.
* @return Returns the new function.
*/
<T>(value: T) => () => T;
declare const constant: Constant;
export = constant;
+63
View File
@@ -0,0 +1,63 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Includes {
/**
* 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;
/**
* 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.
*/
<T>(target: T): Includes1x1<T>;
/**
* 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.
*/
<T>(target: T, collection: _.List<T> | _.Dictionary<T> | _.NumericDictionary<T> | null | undefined): boolean;
}
interface Includes1x1<T> {
/**
* 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.
*/
(): Includes1x1<T>;
/**
* 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.
*/
(collection: _.List<T> | _.Dictionary<T> | _.NumericDictionary<T> | null | undefined): boolean;
}
declare const contains: Includes;
export = contains;
+15
View File
@@ -0,0 +1,15 @@
interface ConvertOptions {
cap?: boolean;
curry?: boolean;
fixed?: boolean;
immutable?: boolean;
rearg?: boolean;
}
interface Convert {
(func: object, options?: ConvertOptions): any;
(name: string, func: (...args: any[]) => any, options?: ConvertOptions): any;
}
declare const convert: Convert;
export = convert;
+225
View File
@@ -0,0 +1,225 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface CountBy {
/**
* 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;
/**
* 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.
*/
<T>(iteratee: (value: string) => T): CountBy1x1;
/**
* 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.
*/
<T>(iteratee: (value: string) => T, collection: string | null | undefined): _.Dictionary<number>;
/**
* 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.
*/
<T>(iteratee: _.ValueIteratee<T>): CountBy2x1<T>;
/**
* 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.
*/
<T>(iteratee: _.ValueIteratee<T>, collection: _.List<T> | null | undefined): _.Dictionary<number>;
/**
* 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.
*/
<T extends object>(iteratee: _.ValueIteratee<T[keyof T]>, collection: T | null | undefined): _.Dictionary<number>;
}
interface CountBy1x1 {
/**
* 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.
*/
(): CountBy1x1;
/**
* 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.
*/
<T>(collection: string | null | undefined): _.Dictionary<number>;
}
interface CountBy2x1<T> {
/**
* 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.
*/
(): CountBy2x1<T>;
/**
* 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.
*/
(collection: _.List<T> | object | null | undefined): _.Dictionary<number>;
}
declare const countBy: CountBy;
export = countBy;
+17
View File
@@ -0,0 +1,17 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Create =
/**
* 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.
*/
<T extends object, U extends object>(prototype: T) => T & U;
declare const create: Create;
export = create;
+65
View File
@@ -0,0 +1,65 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Curry {
/**
* 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.
*/
<T1, R>(func: (t1: T1) => R): _.CurriedFunction1<T1, R>;
/**
* 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.
*/
<T1, T2, R>(func: (t1: T1, t2: T2) => R): _.CurriedFunction2<T1, T2, R>;
/**
* 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.
*/
<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R): _.CurriedFunction3<T1, T2, T3, R>;
/**
* 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.
*/
<T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): _.CurriedFunction4<T1, T2, T3, T4, R>;
/**
* 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.
*/
<T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): _.CurriedFunction5<T1, T2, T3, T4, T5, R>;
/**
* 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.
*/
(func: (...args: any[]) => any): (...args: any[]) => any;
}
declare const curry: Curry;
export = curry;
+148
View File
@@ -0,0 +1,148 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Curry {
/**
* 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;
/**
* 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.
*/
(arity: number): Curry1x1;
/**
* 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.
*/
<T1, R>(arity: number, func: (t1: T1) => R): _.CurriedFunction1<T1, R>;
/**
* 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.
*/
<T1, T2, R>(arity: number, func: (t1: T1, t2: T2) => R): _.CurriedFunction2<T1, T2, R>;
/**
* 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.
*/
<T1, T2, T3, R>(arity: number, func: (t1: T1, t2: T2, t3: T3) => R): _.CurriedFunction3<T1, T2, T3, R>;
/**
* 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.
*/
<T1, T2, T3, T4, R>(arity: number, func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): _.CurriedFunction4<T1, T2, T3, T4, R>;
/**
* 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.
*/
<T1, T2, T3, T4, T5, R>(arity: number, func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): _.CurriedFunction5<T1, T2, T3, T4, T5, R>;
/**
* 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.
*/
(arity: number, func: (...args: any[]) => any): (...args: any[]) => any;
}
interface Curry1x1 {
/**
* 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.
*/
(): Curry1x1;
/**
* 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.
*/
<T1, R>(func: (t1: T1) => R): _.CurriedFunction1<T1, R>;
/**
* 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.
*/
<T1, T2, R>(func: (t1: T1, t2: T2) => R): _.CurriedFunction2<T1, T2, R>;
/**
* 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.
*/
<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R): _.CurriedFunction3<T1, T2, T3, R>;
/**
* 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.
*/
<T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): _.CurriedFunction4<T1, T2, T3, T4, R>;
/**
* 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.
*/
<T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): _.CurriedFunction5<T1, T2, T3, T4, T5, R>;
/**
* 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.
*/
(func: (...args: any[]) => any): (...args: any[]) => any;
}
declare const curryN: Curry;
export = curryN;
+59
View File
@@ -0,0 +1,59 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface CurryRight {
/**
* 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.
*/
<T1, R>(func: (t1: T1) => R): _.RightCurriedFunction1<T1, R>;
/**
* 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.
*/
<T1, T2, R>(func: (t1: T1, t2: T2) => R): _.RightCurriedFunction2<T1, T2, R>;
/**
* 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.
*/
<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R): _.RightCurriedFunction3<T1, T2, T3, R>;
/**
* 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.
*/
<T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): _.RightCurriedFunction4<T1, T2, T3, T4, R>;
/**
* 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.
*/
<T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): _.RightCurriedFunction5<T1, T2, T3, T4, T5, R>;
/**
* 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.
*/
(func: (...args: any[]) => any): (...args: any[]) => any;
}
declare const curryRight: CurryRight;
export = curryRight;
+133
View File
@@ -0,0 +1,133 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface CurryRight {
/**
* 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;
/**
* 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.
*/
(arity: number): CurryRight1x1;
/**
* 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.
*/
<T1, R>(arity: number, func: (t1: T1) => R): _.RightCurriedFunction1<T1, R>;
/**
* 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.
*/
<T1, T2, R>(arity: number, func: (t1: T1, t2: T2) => R): _.RightCurriedFunction2<T1, T2, R>;
/**
* 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.
*/
<T1, T2, T3, R>(arity: number, func: (t1: T1, t2: T2, t3: T3) => R): _.RightCurriedFunction3<T1, T2, T3, R>;
/**
* 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.
*/
<T1, T2, T3, T4, R>(arity: number, func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): _.RightCurriedFunction4<T1, T2, T3, T4, R>;
/**
* 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.
*/
<T1, T2, T3, T4, T5, R>(arity: number, func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): _.RightCurriedFunction5<T1, T2, T3, T4, T5, R>;
/**
* 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.
*/
(arity: number, func: (...args: any[]) => any): (...args: any[]) => any;
}
interface CurryRight1x1 {
/**
* 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.
*/
(): CurryRight1x1;
/**
* 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.
*/
<T1, R>(func: (t1: T1) => R): _.RightCurriedFunction1<T1, R>;
/**
* 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.
*/
<T1, T2, R>(func: (t1: T1, t2: T2) => R): _.RightCurriedFunction2<T1, T2, R>;
/**
* 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.
*/
<T1, T2, T3, R>(func: (t1: T1, t2: T2, t3: T3) => R): _.RightCurriedFunction3<T1, T2, T3, R>;
/**
* 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.
*/
<T1, T2, T3, T4, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4) => R): _.RightCurriedFunction4<T1, T2, T3, T4, R>;
/**
* 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.
*/
<T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): _.RightCurriedFunction5<T1, T2, T3, T4, T5, R>;
/**
* 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.
*/
(func: (...args: any[]) => any): (...args: any[]) => any;
}
declare const curryRightN: CurryRight;
export = curryRightN;
+118
View File
@@ -0,0 +1,118 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Debounce {
/**
* 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 and a flush method to immediately invoke them. 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;
/**
* 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 and a flush method to immediately invoke them. 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.
*/
(wait: number): Debounce1x1;
/**
* 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 and a flush method to immediately invoke them. 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.
*/
<T extends (...args: any[]) => any>(wait: number, func: T): T & _.Cancelable;
}
interface Debounce1x1 {
/**
* 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 and a flush method to immediately invoke them. 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.
*/
(): Debounce1x1;
/**
* 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 and a flush method to immediately invoke them. 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.
*/
<T extends (...args: any[]) => any>(func: T): T & _.Cancelable;
}
declare const debounce: Debounce;
export = debounce;
+16
View File
@@ -0,0 +1,16 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Deburr =
/**
* 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.
*/
(string: string) => string;
declare const deburr: Deburr;
export = deburr;
+103
View File
@@ -0,0 +1,103 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface DefaultTo {
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
(): DefaultTo;
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
<T>(defaultValue: T): DefaultTo1x1<T>;
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
<T>(defaultValue: T, value: T | null | undefined): T;
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
<TDefault>(defaultValue: TDefault): DefaultTo2x1<TDefault>;
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
<T, TDefault>(defaultValue: TDefault, value: T | null | undefined): T | TDefault;
}
interface DefaultTo1x1<T> {
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
(): DefaultTo1x1<T>;
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
(value: T | null | undefined): T;
}
interface DefaultTo2x1<TDefault> {
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
(): DefaultTo2x1<TDefault>;
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @param value The value to check.
* @param defaultValue The default value.
* @returns Returns the resolved value.
*/
<T>(value: T | null | undefined): T | TDefault;
}
declare const defaultTo: DefaultTo;
export = defaultTo;
+71
View File
@@ -0,0 +1,71 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Defaults {
/**
* 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;
/**
* 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.
*/
<TSource>(source: TSource): Defaults1x1<TSource>;
/**
* 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.
*/
<TObject, TSource>(source: TSource, object: TObject): TSource & TObject;
}
interface Defaults1x1<TSource> {
/**
* 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.
*/
(): Defaults1x1<TSource>;
/**
* 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.
*/
<TObject>(object: TObject): TSource & TObject;
}
declare const defaults: Defaults;
export = defaults;
+20
View File
@@ -0,0 +1,20 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Defaults =
/**
* 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.
*/
(object: ReadonlyArray<any>) => any;
declare const defaultsAll: Defaults;
export = defaultsAll;
+46
View File
@@ -0,0 +1,46 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface DefaultsDeep {
/**
* 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;
/**
* 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.
**/
(sources: any): DefaultsDeep1x1;
/**
* 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.
**/
(sources: any, object: any): any;
}
interface DefaultsDeep1x1 {
/**
* 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.
**/
(): DefaultsDeep1x1;
/**
* 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.
**/
(object: any): any;
}
declare const defaultsDeep: DefaultsDeep;
export = defaultsDeep;
+15
View File
@@ -0,0 +1,15 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type DefaultsDeep =
/**
* 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.
**/
(object: ReadonlyArray<any>) => any;
declare const defaultsDeepAll: DefaultsDeep;
export = defaultsDeepAll;
+17
View File
@@ -0,0 +1,17 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Defer =
/**
* 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.
*/
(func: (...args: any[]) => any, ...args: any[]) => number;
declare const defer: Defer;
export = defer;
+56
View File
@@ -0,0 +1,56 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Delay {
/**
* 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;
/**
* 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.
*/
(wait: number): Delay1x1;
/**
* 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.
*/
(wait: number, func: (...args: any[]) => any): number;
}
interface Delay1x1 {
/**
* 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.
*/
(): Delay1x1;
/**
* 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.
*/
(func: (...args: any[]) => any): number;
}
declare const delay: Delay;
export = delay;
+58
View File
@@ -0,0 +1,58 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface 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;
/**
* 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.
*/
<T>(array: _.List<T> | null | undefined): Difference1x1<T>;
/**
* 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.
*/
<T>(array: _.List<T> | null | undefined, values: _.List<T>): T[];
}
interface Difference1x1<T> {
/**
* 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.
*/
(): Difference1x1<T>;
/**
* 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.
*/
(values: _.List<T>): T[];
}
declare const difference: Difference;
export = difference;
+114
View File
@@ -0,0 +1,114 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface DifferenceBy {
/**
* 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;
/**
* 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.
*/
<T1, T2>(iteratee: _.ValueIteratee<T1 | T2>): DifferenceBy1x1<T1, T2>;
/**
* 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.
*/
<T1, T2>(iteratee: _.ValueIteratee<T1 | T2>, array: _.List<T1> | null | undefined): DifferenceBy1x2<T1, T2>;
/**
* 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.
*/
<T1, T2>(iteratee: _.ValueIteratee<T1 | T2>, array: _.List<T1> | null | undefined, values: _.List<T2>): T1[];
}
interface DifferenceBy1x1<T1, T2> {
/**
* 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.
*/
(): DifferenceBy1x1<T1, T2>;
/**
* 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.
*/
(array: _.List<T1> | null | undefined): DifferenceBy1x2<T1, T2>;
/**
* 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.
*/
(array: _.List<T1> | null | undefined, values: _.List<T2>): T1[];
}
interface DifferenceBy1x2<T1, T2> {
/**
* 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.
*/
(): DifferenceBy1x2<T1, T2>;
/**
* 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.
*/
(values: _.List<T2>): T1[];
}
declare const differenceBy: DifferenceBy;
export = differenceBy;
+168
View File
@@ -0,0 +1,168 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface DifferenceWith {
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
(): DifferenceWith;
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
<T1, T2>(comparator: _.Comparator2<T1, T2>): DifferenceWith1x1<T1, T2>;
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
<T1, T2>(comparator: _.Comparator2<T1, T2>, array: _.List<T1> | null | undefined): DifferenceWith1x2<T1, T2>;
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
<T1, T2>(comparator: _.Comparator2<T1, T2>, array: _.List<T1> | null | undefined, values: _.List<T2>): T1[];
}
interface DifferenceWith1x1<T1, T2> {
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
(): DifferenceWith1x1<T1, T2>;
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
(array: _.List<T1> | null | undefined): DifferenceWith1x2<T1, T2>;
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
(array: _.List<T1> | null | undefined, values: _.List<T2>): T1[];
}
interface DifferenceWith1x2<T1, T2> {
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
(): DifferenceWith1x2<T1, T2>;
/**
* 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.
*
* @category Array
* @param [values] The arrays to inspect.
* @param [comparator] The comparator invoked per element.
* @returns Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
(values: _.List<T2>): T1[];
}
declare const differenceWith: DifferenceWith;
export = differenceWith;
+63
View File
@@ -0,0 +1,63 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Unset {
/**
* 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;
/**
* 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.
*/
(path: _.PropertyPath): Unset1x1;
/**
* 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.
*/
(path: _.PropertyPath, object: any): boolean;
}
interface Unset1x1 {
/**
* 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.
*/
(): Unset1x1;
/**
* 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.
*/
(object: any): boolean;
}
declare const dissoc: Unset;
export = dissoc;
+63
View File
@@ -0,0 +1,63 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Unset {
/**
* 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;
/**
* 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.
*/
(path: _.PropertyPath): Unset1x1;
/**
* 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.
*/
(path: _.PropertyPath, object: any): boolean;
}
interface Unset1x1 {
/**
* 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.
*/
(): Unset1x1;
/**
* 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.
*/
(object: any): boolean;
}
declare const dissocPath: Unset;
export = dissocPath;
+51
View File
@@ -0,0 +1,51 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Divide {
/**
* Divide two numbers.
*
* @param dividend The first number in a division.
* @param divisor The second number in a division.
* @returns Returns the quotient.
*/
(): Divide;
/**
* Divide two numbers.
*
* @param dividend The first number in a division.
* @param divisor The second number in a division.
* @returns Returns the quotient.
*/
(dividend: number): Divide1x1;
/**
* Divide two numbers.
*
* @param dividend The first number in a division.
* @param divisor The second number in a division.
* @returns Returns the quotient.
*/
(dividend: number, divisor: number): number;
}
interface Divide1x1 {
/**
* Divide two numbers.
*
* @param dividend The first number in a division.
* @param divisor The second number in a division.
* @returns Returns the quotient.
*/
(): Divide1x1;
/**
* Divide two numbers.
*
* @param dividend The first number in a division.
* @param divisor The second number in a division.
* @returns Returns the quotient.
*/
(divisor: number): number;
}
declare const divide: Divide;
export = divide;
+53
View File
@@ -0,0 +1,53 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Drop {
/**
* 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;
/**
* 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.
*/
(n: number): Drop1x1;
/**
* 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.
*/
<T>(n: number, array: _.List<T> | null | undefined): T[];
}
interface Drop1x1 {
/**
* 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.
*/
(): Drop1x1;
/**
* 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.
*/
<T>(array: _.List<T> | null | undefined): T[];
}
declare const drop: Drop;
export = drop;
+53
View File
@@ -0,0 +1,53 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface DropRight {
/**
* 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;
/**
* 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.
*/
(n: number): DropRight1x1;
/**
* 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.
*/
<T>(n: number, array: _.List<T> | null | undefined): T[];
}
interface DropRight1x1 {
/**
* 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.
*/
(): DropRight1x1;
/**
* 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.
*/
<T>(array: _.List<T> | null | undefined): T[];
}
declare const dropLast: DropRight;
export = dropLast;
+108
View File
@@ -0,0 +1,108 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface DropRightWhile {
/**
* 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;
/**
* 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.
*/
<T>(predicate: _.ValueIteratee<T>): DropRightWhile1x1<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.
*/
<T>(predicate: _.ValueIteratee<T>, array: _.List<T> | null | undefined): T[];
}
interface DropRightWhile1x1<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.
*/
(): DropRightWhile1x1<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.
*/
(array: _.List<T> | null | undefined): T[];
}
declare const dropLastWhile: DropRightWhile;
export = dropLastWhile;
+53
View File
@@ -0,0 +1,53 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface DropRight {
/**
* 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;
/**
* 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.
*/
(n: number): DropRight1x1;
/**
* 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.
*/
<T>(n: number, array: _.List<T> | null | undefined): T[];
}
interface DropRight1x1 {
/**
* 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.
*/
(): DropRight1x1;
/**
* 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.
*/
<T>(array: _.List<T> | null | undefined): T[];
}
declare const dropRight: DropRight;
export = dropRight;
+108
View File
@@ -0,0 +1,108 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface DropRightWhile {
/**
* 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;
/**
* 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.
*/
<T>(predicate: _.ValueIteratee<T>): DropRightWhile1x1<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.
*/
<T>(predicate: _.ValueIteratee<T>, array: _.List<T> | null | undefined): T[];
}
interface DropRightWhile1x1<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.
*/
(): DropRightWhile1x1<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.
*/
(array: _.List<T> | null | undefined): T[];
}
declare const dropRightWhile: DropRightWhile;
export = dropRightWhile;
+108
View File
@@ -0,0 +1,108 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface DropWhile {
/**
* 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;
/**
* 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.
*/
<T>(predicate: _.ValueIteratee<T>): DropWhile1x1<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.
*/
<T>(predicate: _.ValueIteratee<T>, array: _.List<T> | null | undefined): T[];
}
interface DropWhile1x1<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.
*/
(): DropWhile1x1<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.
*/
(array: _.List<T> | null | undefined): T[];
}
declare const dropWhile: DropWhile;
export = dropWhile;
+330
View File
@@ -0,0 +1,330 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface ForEach {
/**
* 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;
/**
* 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.
*/
<T>(iteratee: (value: T) => any): ForEach1x1<T>;
/**
* 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.
*/
<T>(iteratee: (value: T) => any, collection: ReadonlyArray<T>): T[];
/**
* 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.
*/
(iteratee: (value: string) => any): ForEach2x1;
/**
* 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.
*/
(iteratee: (value: string) => any, collection: string): string;
/**
* 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.
*/
<T>(iteratee: (value: T) => any, collection: _.List<T>): _.List<T>;
/**
* 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.
*/
<T extends object>(iteratee: (value: T[keyof T]) => any, collection: T): T;
/**
* 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.
*/
<T, TArray extends T[] | null | undefined>(iteratee: (value: T) => any, collection: TArray & (T[] | null | undefined)): TArray;
/**
* 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.
*/
<TString extends string | null | undefined>(iteratee: (value: string) => any, collection: TString): TString;
/**
* 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.
*/
<T, TList extends _.List<T> | null | undefined>(iteratee: (value: T) => any, collection: TList & (_.List<T> | null | undefined)): TList;
/**
* 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.
*/
<T extends object>(iteratee: (value: T[keyof T]) => any, collection: T | null | undefined): T | null | undefined;
}
interface ForEach1x1<T> {
/**
* 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.
*/
(): ForEach1x1<T>;
/**
* 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.
*/
(collection: ReadonlyArray<T>): T[];
/**
* 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.
*/
(collection: _.List<T>): _.List<T>;
/**
* 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.
*/
<T1 extends object>(collection: T1): T1;
/**
* 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.
*/
<TArray extends T[] | null | undefined>(collection: TArray & (T[] | null | undefined)): TArray;
/**
* 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.
*/
<TList extends _.List<T> | null | undefined>(collection: TList & (_.List<T> | null | undefined)): TList;
/**
* 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.
*/
<T1 extends object>(collection: T1 | null | undefined): T1 | null | undefined;
}
interface ForEach2x1 {
/**
* 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.
*/
(): ForEach2x1;
/**
* 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.
*/
(collection: string): string;
/**
* 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.
*/
<TString extends string | null | undefined>(collection: TString): TString;
}
declare const each: ForEach;
export = each;
+225
View File
@@ -0,0 +1,225 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface ForEachRight {
/**
* 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;
/**
* 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.
*/
<T>(iteratee: (value: T) => any): ForEachRight1x1<T>;
/**
* 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.
*/
<T>(iteratee: (value: T) => any, collection: ReadonlyArray<T>): T[];
/**
* 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.
*/
(iteratee: (value: string) => any): ForEachRight2x1;
/**
* 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.
*/
(iteratee: (value: string) => any, collection: string): string;
/**
* 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.
*/
<T>(iteratee: (value: T) => any, collection: _.List<T>): _.List<T>;
/**
* 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.
*/
<T extends object>(iteratee: (value: T[keyof T]) => any, collection: T): T;
/**
* 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.
*/
<T, TArray extends T[] | null | undefined>(iteratee: (value: T) => any, collection: TArray & (T[] | null | undefined)): TArray;
/**
* 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.
*/
<TString extends string | null | undefined>(iteratee: (value: string) => any, collection: TString): TString;
/**
* 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.
*/
<T, TList extends _.List<T> | null | undefined>(iteratee: (value: T) => any, collection: TList & (_.List<T> | null | undefined)): TList;
/**
* 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.
*/
<T extends object>(iteratee: (value: T[keyof T]) => any, collection: T | null | undefined): T | null | undefined;
}
interface ForEachRight1x1<T> {
/**
* 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.
*/
(): ForEachRight1x1<T>;
/**
* 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.
*/
(collection: ReadonlyArray<T>): T[];
/**
* 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.
*/
(collection: _.List<T>): _.List<T>;
/**
* 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.
*/
<T1 extends object>(collection: T1): T1;
/**
* 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.
*/
<TArray extends T[] | null | undefined>(collection: TArray & (T[] | null | undefined)): TArray;
/**
* 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.
*/
<TList extends _.List<T> | null | undefined>(collection: TList & (_.List<T> | null | undefined)): TList;
/**
* 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.
*/
<T1 extends object>(collection: T1 | null | undefined): T1 | null | undefined;
}
interface ForEachRight2x1 {
/**
* 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.
*/
(): ForEachRight2x1;
/**
* 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.
*/
(collection: string): string;
/**
* 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.
*/
<TString extends string | null | undefined>(collection: TString): TString;
}
declare const eachRight: ForEachRight;
export = eachRight;
+56
View File
@@ -0,0 +1,56 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface EndsWith {
/**
* 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;
/**
* 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.
*/
(target: string): EndsWith1x1;
/**
* 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.
*/
(target: string, string: string): boolean;
}
interface EndsWith1x1 {
/**
* 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.
*/
(): EndsWith1x1;
/**
* 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.
*/
(string: string): boolean;
}
declare const endsWith: EndsWith;
export = endsWith;
+25
View File
@@ -0,0 +1,25 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface ToPairs {
/**
* 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.
*/
<T>(object: _.Dictionary<T> | _.NumericDictionary<T>): Array<[string, T]>;
/**
* 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.
*/
(object: object): Array<[string, any]>;
}
declare const entries: ToPairs;
export = entries;
+25
View File
@@ -0,0 +1,25 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface ToPairsIn {
/**
* 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.
*/
<T>(object: _.Dictionary<T> | _.NumericDictionary<T>): Array<[string, T]>;
/**
* 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.
*/
(object: object): Array<[string, any]>;
}
declare const entriesIn: ToPairsIn;
export = entriesIn;
+156
View File
@@ -0,0 +1,156 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface Eq {
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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;
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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
*/
(value: any): Eq1x1;
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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
*/
(value: any, other: any): boolean;
}
interface Eq1x1 {
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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
*/
(): Eq1x1;
/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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
*/
(other: any): boolean;
}
declare const eq: Eq;
export = eq;
+141
View File
@@ -0,0 +1,141 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface IsEqual {
/**
* 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.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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;
/**
* 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.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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
*/
(value: any): IsEqual1x1;
/**
* 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.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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
*/
(value: any, other: any): boolean;
}
interface IsEqual1x1 {
/**
* 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.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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
*/
(): IsEqual1x1;
/**
* 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.
*
* @category Lang
* @param value The value to compare.
* @param other The other value to compare.
* @returns 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
*/
(other: any): boolean;
}
declare const equals: IsEqual;
export = equals;
+26
View File
@@ -0,0 +1,26 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type Escape =
/**
* 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.
*/
(string: string) => string;
declare const escape: Escape;
export = escape;
+16
View File
@@ -0,0 +1,16 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type EscapeRegExp =
/**
* Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]",
* "{", "}", and "|" in string.
*
* @param string The string to escape.
* @return Returns the escaped string.
*/
(string: string) => string;
declare const escapeRegExp: EscapeRegExp;
export = escapeRegExp;
+67
View File
@@ -0,0 +1,67 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface Every {
/**
* 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;
/**
* 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.
*/
<T>(predicate: _.ValueIterateeCustom<T, boolean>): Every1x1<T>;
/**
* 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.
*/
<T>(predicate: _.ValueIterateeCustom<T, boolean>, collection: _.List<T> | null | undefined): boolean;
/**
* 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.
*/
<T extends object>(predicate: _.ValueIterateeCustom<T[keyof T], boolean>, collection: T | null | undefined): boolean;
}
interface Every1x1<T> {
/**
* 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.
*/
(): Every1x1<T>;
/**
* 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.
*/
(collection: _.List<T> | object | null | undefined): boolean;
}
declare const every: Every;
export = every;
+151
View File
@@ -0,0 +1,151 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
interface AssignIn {
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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;
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TObject>(object: TObject): AssignIn1x1<TObject>;
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
}
interface AssignIn1x1<TObject> {
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
(): AssignIn1x1<TObject>;
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TSource>(source: TSource): TObject & TSource;
}
declare const extend: AssignIn;
export = extend;
+36
View File
@@ -0,0 +1,36 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
type AssignIn =
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @alias extend
* @category Object
* @param object The destination object.
* @param [sources] The source objects.
* @returns 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 }
*/
<TResult>(object: ReadonlyArray<any>) => TResult;
declare const extendAll: AssignIn;
export = extendAll;
+143
View File
@@ -0,0 +1,143 @@
// AUTO-GENERATED: do not modify this file directly.
// If you need to make changes, modify generate-fp.ts (if necessary), then open a terminal in types/lodash/scripts, and do:
// npm run fp
import _ = require("../index");
interface AssignInWith {
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(customizer: _.AssignCustomizer): AssignInWith1x1;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(customizer: _.AssignCustomizer, args: ReadonlyArray<any>): any;
}
interface AssignInWith1x1 {
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(): AssignInWith1x1;
/**
* 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`.
*
* @alias extendWith
* @category Object
* @param object The destination object.
* @param sources The source objects.
* @param [customizer] The function to customize assigned values.
* @returns 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 }
*/
(args: ReadonlyArray<any>): any;
}
declare const extendAllWith: AssignInWith;
export = extendAllWith;

Some files were not shown because too many files have changed in this diff Show More