https://github.com/strml/flow-bluebird
https://github.com/strml/flow-bluebird
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/strml/flow-bluebird
- Owner: STRML
- Created: 2015-12-10T18:06:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-22T14:39:52.000Z (over 10 years ago)
- Last Synced: 2025-08-31T03:44:23.014Z (7 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flow-bluebird
Attempting to override builtin Promise with Bluebird and make async/await work.
[Was not successful](https://github.com/facebook/flow/issues/1171) with the `declare` syntax, so I'm
redirecting requires to a `util/bluebird.js` module that defines the class' interface.
Output is:
```
$ flow
test.js:6
6: let output = await doubleAsync(a);
^^^^^^^^^^^^^^^^^^^^ await
7: return output / 2;
^^^^^^ Promise. This type is incompatible with
7: return output / 2;
^^^^^^^^^^ number
test.js:17
17: return result[0] / 2;
^^^^^^^^^ access of computed property/element. Indexable signature not found in
17: return result[0] / 2;
^^^^^^ Promise
test.js:21
21: return await Promise.doesntExist(doubleAsync(a));
^^^^^^^^^^^ property `doesntExist`. Property not found in
704: export default Promise;
^^^^^^^ statics of Promise. See: util/bluebird.js:704
Found 3 errors
```
Would expect no errors on line 6 and 17, error on 21 is expected and indicative that the bluebird
definition is being properly read.