Comments (2)
@marudor Having BluebirdPromise seems to be cleaner, but now we have to cast the BluebirdPromise into Promise whenever we use it with a method that declares that it uses Promise
:
const bluebird = require('bluebird')
module.exports = function (obj: Object) : Promise<Object> {
return Promise.resolve(bluebird.props(obj))
}
Is there a way to tell flow that a BluebirdPromise
is a superset of a Promise
?
from flowinterfaces.
@despairblue hmm indeed.
@coot
What's the preference here?
As I override the global Promise Object like this:
import BluebirdPromise from 'bluebird'
declare var Promise: BluebirdPromise
I do not really care.
But I tend to rename it back to Promise if it helps.
from flowinterfaces.
Related Issues (20)
- Type for unbind is wrong
- iflow-redux has issues when upgrading flow to 0.28.0 HOT 2
- Update flow-bin to 0.29.0 got problems with axios.d.js and bluebird.d.js HOT 1
- iflow-lodash: zip requires all arrays to be of the same type. HOT 2
- iflow-lodash: _.create declaration appears to be wrong HOT 1
- Preserve elements' type in lodash.flatten
- Memoize type def HOT 2
- Definitions for jQuery UI or jQuery plugins in general
- flow 0.32.0 claims errors on simple jquery.ajaxSetup HOT 3
- iflow-bluebird: Promise.promisify - Property not found HOT 6
- Flow 0.33 keeps merging inference forever HOT 1
- react-router -> withRouter claim HOT 2
- JQueryPromise doesn't accept arrow function as callback HOT 1
- JQueryStatic. Ineligible value used in/as type annotation (did you forget 'typeof'?) HOT 1
- JQuery overloads in wrong order!
- JQueryXHR class is missing the done, fail and always functions
- [Koa] Moment definitions
- Partial definitions HOT 1
- Some jQuery methods not chainable without causing incorrect Flow errors HOT 3
- Error: Cannot extend multiple classes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowinterfaces.