flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
23
VISUALIZACION/node_modules/index-array-by/dist/index-array-by.d.ts
generated
vendored
Executable file
23
VISUALIZACION/node_modules/index-array-by/dist/index-array-by.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
type ListItem = any;
|
||||
|
||||
type KeyAccessor = string | ((listItem: ListItem) => string);
|
||||
|
||||
type ReducerFn = (items: ListItem[]) => any;
|
||||
|
||||
interface NestedResult {
|
||||
[key: string]: NestedResult | ListItem | ListItem[];
|
||||
}
|
||||
|
||||
type FlatResult = {
|
||||
keys: string[];
|
||||
vals: ListItem | ListItem[]
|
||||
}[];
|
||||
|
||||
declare function indexBy(
|
||||
list: ListItem[],
|
||||
keyAccessors: KeyAccessor | KeyAccessor[],
|
||||
multiItem?: boolean | ReducerFn,
|
||||
flattenKeys?: boolean
|
||||
): NestedResult | FlatResult;
|
||||
|
||||
export { indexBy as default };
|
||||
Loading…
Add table
Add a link
Reference in a new issue