Skip to content
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: correctly infer the type of the function passed to derived #50

Merged
merged 1 commit into from
Sep 23, 2022

Conversation

divdavem
Copy link
Member

Before this PR, the type of the function passed to derived was not correctly inferred by typescript in the async case. By putting the async case first in the list of overloads of the derived function, it looks like it fixes the issue, and the type is still correctly inferred in the sync case too.

Before this commit, the type of the function passed to derived was not
correctly inferred by typescript in the async case. By putting the async
case first in the list of overloads of the derived function, it looks like
it fixes the issue, and the type is still correctly inferred in the sync
case too.
@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Merging #50 (bc8d8d3) into master (e7bcb2e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #50   +/-   ##
=======================================
  Coverage   98.85%   98.85%           
=======================================
  Files           1        1           
  Lines         174      174           
  Branches       32       32           
=======================================
  Hits          172      172           
  Partials        2        2           
Impacted Files Coverage Δ
src/index.ts 98.85% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@divdavem
Copy link
Member Author

Cf the similar PR in svelte: sveltejs/svelte#5935

@divdavem divdavem requested a review from fbasso September 23, 2022 11:39
Copy link
Contributor

@fbasso fbasso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for me, thanks @divdavem :)

@divdavem
Copy link
Member Author

@fbasso Thank you for your review!

@divdavem divdavem merged commit d60a61d into AmadeusITGroup:master Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants