diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 43b8a774c1..e1e3db3ab7 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -819,15 +819,25 @@ declare module _ { export function compact(array: List): T[]; /** - * Flattens a nested array (the nesting can be to any depth). If you pass shallow, the array will - * only be flattened a single level. + * Flattens a nested array (the nesting can be to any depth). If isShallow is truey, the + * array will only be flattened a single level. If a callback is provided each element of + * the array is passed through the callback before flattening. The callback is bound to + * thisArg and invoked with three arguments; (value, index, array). + * + * If a property name is provided for callback the created "_.pluck" style callback will + * return the property value of the given element. + * + * If an object is provided for callback the created "_.where" style callback will return + * true for elements that have the properties of the given object, else false. * @param array The array to flatten. * @param shallow If true then only flatten one level, optional, default = false. * @return `array` flattened. **/ export function flatten( array: List, - shallow?: boolean): any[]; + isShallow?, + callback?: ListIterator, + thisArg?: any): any[]; /** * Returns a copy of the array with all instances of the values removed.