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

[TS] explicit return value of undefined does not work #276

Closed
aleclarson opened this issue Dec 18, 2018 · 1 comment
Closed

[TS] explicit return value of undefined does not work #276

aleclarson opened this issue Dec 18, 2018 · 1 comment

Comments

@aleclarson
Copy link
Member

aleclarson commented Dec 18, 2018

let base: {readonly a: number} = {a: 1}
let result: typeof base = produce(base, s => void s.a++)

For any recipe function that explicitly returns undefined, its return type is incorrectly inferred to be undefined instead of typeof base.

This will be fixed in v1.9.3

@aleclarson
Copy link
Member Author

🎉 This issue has been resolved in version 1.9.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant