objectValues.js.flow 358 B

1234567891011
  1. // @flow strict
  2. import type { ObjMap } from '../jsutils/ObjMap';
  3. declare function objectValues<T>(obj: ObjMap<T>): Array<T>;
  4. /* eslint-disable no-redeclare */
  5. // $FlowFixMe workaround for: https://github.com/facebook/flow/issues/2221
  6. const objectValues =
  7. Object.values || ((obj) => Object.keys(obj).map((key) => obj[key]));
  8. export default objectValues;