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

Filter type by condition specified in callback function #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Havelis
Copy link

@Havelis Havelis commented Dec 11, 2019

I was trying to filter out items by type guard and I notice that filter is implemented just in the way that the returned SubDocumentArray has not any information about doc's fields. So I add implementation for filter which returned type is based on the condition specified in callback function.

But, I'm not sure about the S[] & SubDocumentArrayNoId<S> in return type. It is right or it should return just S[]?

Thanks for any advice.

@codecov-io
Copy link

Codecov Report

Merging #39 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #39   +/-   ##
======================================
  Coverage    90.9%   90.9%           
======================================
  Files           5       5           
  Lines          33      33           
  Branches        5       5           
======================================
  Hits           30      30           
  Misses          3       3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77fe55d...7c03cb3. Read the comment docs.

@faltysad
Copy link

+1 on this

@rongyadong
Copy link

+1 on this as well

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.

None yet

4 participants