-
Notifications
You must be signed in to change notification settings - Fork 367
Fix Promise/Callback variants in datasource types #1807
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
Conversation
hacksparrow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
emonddr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only commit message needs fixing.
6210905 to
b80d604
Compare
raymondfeng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Remove usage of `PromiseOrVoid`, it makes it difficult to consume the API via `await`. For each async method, define multiple variants to correctly describe what's returned when a callback arg was provided (`void`) and what's returned when called with no callback (`Promise<T>`). Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
b80d604 to
19048cd
Compare
jannyHou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Remove usage of
PromiseOrVoid, it makes it difficult to consume the API viaawait. For each async method, define multiple variants to correctly describe what's returned when a callback arg was provided (void) and what's returned when called with no callback (Promise<T>).See loopbackio/loopback-next#4235 for background information.
Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm testpasses on your machine