Skip to content

add Array.prototype.filter signature with type guard - #10916

Closed
Michael Maier (maiermic) wants to merge 5 commits into
microsoft:masterfrom
maiermic:type-guards-in-Array.prototype.filter-2
Closed

add Array.prototype.filter signature with type guard#10916
Michael Maier (maiermic) wants to merge 5 commits into
microsoft:masterfrom
maiermic:type-guards-in-Array.prototype.filter-2

Conversation

@maiermic

Copy link
Copy Markdown

10027 also didn't add the overload to Array#filter, only to ReadOnlyArray#filter. Mohamed Hegazy (@mhegazy) could you reopen this issue?

-- Arnavion's comment

This only adds it to ReadOnlyArray though. Also need it for regular Array.
-- Arnavion's comment

See #7657 and #10027

@msftclas

Hi Michael Maier (@maiermic), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@mhegazy

Copy link
Copy Markdown
Contributor

thanks Michael Maier (@maiermic), some baslines changed, you will need to do a gulp baseline-accept

@mhegazy Mohamed Hegazy (mhegazy) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We will need to update the baselines as well. gulp baseline-accept will do the trick.

@maiermic

Copy link
Copy Markdown
Author

Mohamed Hegazy (@mhegazy) Thanks, I appreciate your help.

@mhegazy

Copy link
Copy Markdown
Contributor

waiting on the CI.

@maiermic

Michael Maier (maiermic) commented Sep 14, 2016

Copy link
Copy Markdown
Author

Mohamed Hegazy (@mhegazy) Two tests failed on my machine. I ran gulp baseline-accept a second time and it modified two more files. I guess all tests will pass now, but this time I wait until my local test runner is done.

Update: Tests passed on my machine and I pushed my changes. Waiting on the CI again 😅

@bcherny

Copy link
Copy Markdown

Mohamed Hegazy (@mhegazy) Is it possible to merge this?

@mhegazy

Copy link
Copy Markdown
Contributor

Sorry this fell off my list for a while. one more comment, we need to update the filter method on ReadOnlyArray, and the TypedArray varients, e.g. Int32Array (all in the same file).

@maiermic

Copy link
Copy Markdown
Author

Mohamed Hegazy (@mhegazy) This pull request only updates filter on Array. I updated filter on ReadOnlyArray in #10027 (already merged). TypedArray varients cann't use a type guard. They are not generic and contain always the same type. No update possible. So it should be possible to merge this.

@ikokostya

Copy link
Copy Markdown
Contributor

Mohamed Hegazy (@mhegazy) Could you review again taking into account latest comment #10916 (comment)?

@teppeis

Copy link
Copy Markdown

Michael Maier (@maiermic) Mohamed Hegazy (@mhegazy) any updates? I could resolve the conflicts and create new pr if you need.

Michael Maier added 2 commits May 4, 2017 07:02
# Conflicts:
#	tests/baselines/reference/arrayFilter.symbols
#	tests/baselines/reference/arrayFilter.types
#	tests/baselines/reference/declarationEmitPromise.symbols
#	tests/baselines/reference/declarationEmitPromise.types
#	tests/baselines/reference/genericMethodOverspecialization.symbols
#	tests/baselines/reference/genericMethodOverspecialization.types
@maiermic

Copy link
Copy Markdown
Author

Teppei Sato (@teppeis) Conflicts are resolved by my latest update. I'm waiting for Mohamed Hegazy (@mhegazy) to merge.

@NaridaL

Copy link
Copy Markdown
Contributor

What's the status on this?

@mysticatea

Copy link
Copy Markdown

Mohamed Hegazy (@mhegazy) Michael Maier (@maiermic) What is happening with this?

@maiermic

Copy link
Copy Markdown
Author

This has been solved by #16223 in the meantime.

@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 19, 2018
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.

8 participants