lodash: Add flattenDepth() for LoDashStatic (#10013)

* lodash: Add flattenDepth() for LoDashStatic

* lodash(flattenDepth): Add optional tag to depth & declare module
This commit is contained in:
Ryan Casperson
2016-07-09 15:28:53 +09:00
committed by Masahiro Wakame
parent 1eb1d55202
commit ead4d214f7
+12 -5
View File
@@ -2000,6 +2000,18 @@ declare module _ {
flattenDeep<T>(): LoDashExplicitArrayWrapper<T>;
}
// _.flattenDepth
interface LoDashStatic {
/**
* Recursively flatten array up to depth times.
*
* @param array The array to recursively flatten.
* @param number The maximum recursion depth.
* @return Returns the new flattened array.
*/
flattenDepth<T>(array: ListOfRecursiveArraysOrValues<T>, depth?: number): T[];
}
//_.fromPairs
interface LoDashStatic {
/**
@@ -19414,15 +19426,10 @@ declare module "lodash/flattenDeep" {
export = flattenDeep;
}
/**
* uncoment it if definition exists
*/
/*
declare module "lodash/flattenDepth" {
const flattenDepth: typeof _.flattenDepth;
export = flattenDepth;
}
*/
declare module "lodash/flip" {
const flip: typeof _.flip;