question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typo in flow for version 1.4.0

See original GitHub issue

Summary

I think there’s a typo in the flow declaration for the new getPowerState method.

Version 1.4.0
Affected OS MacOS
OS Version 10.13.6

Current behavior

I get the following when checking flow on version 1.4.0

Error -- node_modules/react-native-device-info/deviceinfo.js.flow:47:32

Cannot resolve name object.

     44│   getTotalDiskCapacity: () => number,
     45│   getFreeDiskStorage: () => number,
     46│   getBatteryLevel: () => Promise<number>,
     47│   getPowerState: () => Promise<object>,
     48│   isBatteryCharging:() => Promise<boolean>,
     49│   isLandscape: () => boolean,
     50│   isAirPlaneMode: () => Promise<boolean>,

Expected behavior

I imagine it was meant to be Object instead of object

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
mikehardycommented, Mar 29, 2019

I cross-checked myself, in the example I had to do these to check things:

npm install --save-dev babel-cli babel-preset-flow flow-bin@^0.92.0

(alternatively install flow current and edit .flowconfig to accept that version)

edit my babel presets to:

presets: ['module:metro-react-native-babel-preset', 'flow'],

then I could npx flow

The example doesn’t flow-check correctly but it doesn’t throw an error on the definitions themselves.

I published 1.4.1!

1reaction
ggravarrcommented, Mar 29, 2019

Yep, if I use master now it’s fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typo in flow for version 1.4.0 · Issue #613 · react-native-device ...
Summary I think there's a typo in the flow declaration for the new getPowerState method. Version 1.4.0 Affected OS MacOS OS Version 10.13.6 ......
Read more >
OpenFlow Switch Specification - Open Networking Foundation
Version 1.4.0 into the OpenFlow switch. The ingress port can be used when matching packets (see 5.3). The Open-. Flow pipeline can decide...
Read more >
Flow Templates for HR Management release notes
Version 1.4.0 - June 2022: Removed: Patch release of Flow Templates for HR Management. This version includes a fix to remove unused ...
Read more >
VMware Container Networking with Antrea 1.4.0 Release Notes
Antrea Egress allows users to define the SNAT IP used for Pod traffic egressing the cluster. It can be applied e.g., down to...
Read more >
SciPy 1.4.0 Release Notes — SciPy v1.9.3 Manual
SciPy 1.4.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found