Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/compat/array/flatMapDepth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @template T, R
* @param collection - The collection to iterate over.
* @param iteratee - The function invoked per iteration.
* @param [depth=1] - The maximum recursion depth.
* @param [depth] - The maximum recursion depth.
* @returns Returns the new flattened array.
*
* @example
Expand All @@ -55,7 +55,7 @@
* @template T, R
* @param collection - The object to iterate over.
* @param iteratee - The function invoked per iteration.
* @param [depth=1] - The maximum recursion depth.
* @param [depth] - The maximum recursion depth.
* @returns Returns the new flattened array.
*
* @example
Expand All @@ -74,7 +74,7 @@
*
* @param collection - The collection to iterate over.
* @param iteratee - The property name to use as iteratee.
* @param [depth=1] - The maximum recursion depth.
* @param [depth] - The maximum recursion depth.
* @returns Returns the new flattened array.
*
* @example
Expand All @@ -85,14 +85,14 @@
* flatMapDepth(users, 'hobbies', 2);
* // => ['hiking', 'coding', 'reading']
*/
export function flatMapDepth(collection: object | null | undefined, iteratee: string, depth?: number): any[];

Check warning on line 88 in src/compat/array/flatMapDepth.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

/**
* Creates a flattened array of values by running each element through iteratee and flattening the mapped results up to depth times.
*
* @param collection - The collection to iterate over.
* @param iteratee - The object properties to match.
* @param [depth=1] - The maximum recursion depth.
* @param [depth] - The maximum recursion depth.
* @returns Returns the new flattened array.
*
* @example
Expand All @@ -110,7 +110,7 @@
*
* @template T, R
* @param collection - The array or object to iterate over.
* @param [iteratee] - The function that produces the new array elements.
* @param [iteratee=identity] - The function that produces the new array elements.
* @param [depth=1] - The maximum recursion depth.
* @returns A new array that has been flattened up to the specified depth.
*
Expand All @@ -132,7 +132,7 @@
| string
| object = identity,
depth = 1
): T[] | R[] | any[] | boolean[] {

Check warning on line 135 in src/compat/array/flatMapDepth.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (collection == null) {
return [];
}
Expand Down