-
Notifications
You must be signed in to change notification settings - Fork 3k
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
defer type doesn't handle void correctly #4804
Comments
I don't agree with the expected behaviour. |
Fine with me, but then |
Yikes. I didn't even realise that was there. This should definitely have two signatures. |
cartant
added
bug
Confirmed bug
TS
Issues and PRs related purely to TypeScript issues
labels
May 22, 2019
cartant
added a commit
to cartant/rxjs
that referenced
this issue
May 25, 2019
benlesh
pushed a commit
that referenced
this issue
Jun 4, 2019
* test(defer): add failing dtslint test * fix(defer): use overload sig for void factory Closes #4804
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug Report
Current Behavior
When using
defer
with a() => void
factory, the return type will beObservable<any>
.Reproduction
https://stackblitz.com/edit/rxjs-gm1wy5
Expected behavior
When using
defer
with a() => void
factory, the return type will beObservable<never>
.Possible Solution
Adding the following to the declaration:
The text was updated successfully, but these errors were encountered: