Skip to content

chore(typings): add type guard overloads for first/last#3902

Merged
benlesh merged 5 commits intoReactiveX:masterfrom
cartant:issue-3717
Jul 13, 2018
Merged

chore(typings): add type guard overloads for first/last#3902
benlesh merged 5 commits intoReactiveX:masterfrom
cartant:issue-3717

Conversation

@cartant
Copy link
Copy Markdown
Collaborator

@cartant cartant commented Jul 8, 2018

Description:

Uncomments the tests that were skipped when enabling type checking for the test suite. And adds overload signatures with type guards to first and last.

Note that because the predicates are optional, additional overload signatures that match calls made with no arguments or with a null or undefined predicate are required. Otherwise, the S type parameter is inferred as {} and the type of the output observable becomes Observable<{}>.

Related issue (if exists): #3717

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 8, 2018

Coverage Status

Coverage increased (+0.2%) to 96.945% when pulling c31e7a9 on cartant:issue-3717 into f9318d8 on ReactiveX:master.

@cartant cartant force-pushed the issue-3717 branch 2 times, most recently from 3f99bf8 to 7a16ca6 Compare July 8, 2018 07:50
@benlesh benlesh merged commit 3e12f7a into ReactiveX:master Jul 13, 2018
@benlesh
Copy link
Copy Markdown
Member

benlesh commented Jul 13, 2018

👍

@benlesh
Copy link
Copy Markdown
Member

benlesh commented Jul 13, 2018

Oops... just noticed after I merged this... next time this should be labelled a "fix" so it shows up in the change log, since it's an improvement.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 12, 2018
@cartant cartant deleted the issue-3717 branch September 24, 2020 07:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants