Page MenuHomePhabricator

D9712.id32716.diff
No OneTemporary

D9712.id32716.diff

diff --git a/lib/utils/objects.js b/lib/utils/objects.js
--- a/lib/utils/objects.js
+++ b/lib/utils/objects.js
@@ -40,18 +40,11 @@
function values<K, T>(map: ObjectMap<K, T>): T[] {
return Object.values
- ? // https://github.com/facebook/flow/issues/2221
- // $FlowFixMe - Object.values currently does not have good flow support
- Object.values(map)
+ ? Object.values(map)
: Object.keys(map).map((key: K): T => map[key]);
}
-function keys<K, T>(map: ObjectMap<K, T>): K[] {
- return Object.keys(map);
-}
-
function entries<K: string, T>(map: ObjectMap<K, T>): [K, T][] {
- // $FlowFixMe - flow treats the values as mixed, but we know that they are T
return Object.entries(map);
}
@@ -87,7 +80,7 @@
obj2: NestedObjectMap<K, T>,
): NestedObjectMap<K, T> {
let diff: NestedObjectMap<K, T> = {};
- keys(obj1).forEach((key: K) => {
+ Object.keys(obj1).forEach((key: K) => {
if (_isEqual(obj1[key], obj2[key])) {
return;
}
@@ -112,7 +105,7 @@
processedObject: ObjectMap<K, T>,
expectedObject: ObjectMap<K, T>,
message: string,
-) {
+): void {
if (_isEqual(processedObject)(expectedObject)) {
return;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 3:46 AM (17 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2448339
Default Alt Text
D9712.id32716.diff (1 KB)

Event Timeline