-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Support nodejs v8 promise typing #3507
Conversation
Wait.. I think it will break someone who already using this typings 🤔 |
Anyway, could someone please explain this |
@kibertoad I guess the solution of #3422 was wrong. Could you explain why the previous version |
@alexkvak can you please provide some context on what are you trying to fix ?
Yes, finally will not be available in QueryInterface where as it is exposed. |
I try to return node v8 support. Sorry, I can’t provide some code just node. |
So, typescript interfaces are mutable. And it is possible for other packages (like ChainableInterface (what knex.select etc. returns) is not a Promise, but it exposes some promise methods which get delegated to the resolved promise when invoked. When this happens then This is usually not a problem in practice, but one case in particular (timeout) is problematic because Bluebird's timeout doesn't match the signature of an identically named function implemented in Knex. There shouldn't really be a conflict because Bluebird's timeout is not actually available through QueryInterface even if it was the global Promise. But the conflict arises because of the lax type definition of QueryInterface.
It is conceptually similar to Lodash.pick. You get only the keys that you pick mapped to the corresponding values:
|
@alexkvak Can you please share the error that you get ? |
was not available - More closely align the ChainableInterface type to reality Resolves #3507
was not available - More closely align the ChainableInterface type to reality Resolves #3507
@lorefnon thanks! |
Released in 0.20.2 |
No description provided.