UNPKG
reakit-system
Version:
latest (0.15.2)
next (0.16.0-alpha.1)
0.16.0-alpha.1
0.15.2
0.15.1
0.15.0
0.15.0-alpha.4
0.15.0-alpha.3
0.15.0-alpha.2
0.15.0-alpha.1
0.15.0-alpha.0
0.14.5
0.14.4
0.14.3
0.14.2
0.14.1
0.14.0
0.14.0-alpha.1
0.14.0-alpha.0
0.13.1
0.13.0
0.13.0-alpha.1
0.13.0-alpha.0
0.12.2
0.12.1
0.12.0
0.11.0
0.10.0
0.9.0
0.8.0
0.7.2
0.7.1
0.7.0
0.6.8
0.6.7
0.6.6
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.0.1
Reakit System utils
reakit/reakit
reakit-system
/
ts
/
__utils
/
reduceObjects.d.ts
5 lines
(4 loc)
•
251 B
TypeScript
View Raw
1
2
3
4
5
/** * Transforms [{ a: "a" }, { a: "b" }] into { a: ["a", "b"] } */
export
declare
function
reduceObjects<T
extends
Record
<
string
,
any
>>(
objects
: T[],
filter
?:
(
value
: T[keyof T],
key
: keyof T
) =>
boolean
): { [K
in
keyof T]?: T[K][] |
undefined
; };