Skip to content

Add SplitOnRestElement, ExtractRestElement, ExcludeRestElement types #1166

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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

benzaria
Copy link
Contributor

@benzaria benzaria commented Jun 5, 2025

Creadit to @som-sm for introducing CollapseRestElement I modified a version of it to fit my needs, due to VariablePartOfArray not working as wanted for Optional elements.

@benzaria benzaria marked this pull request as draft June 5, 2025 11:07
@benzaria benzaria marked this pull request as ready for review June 6, 2025 01:27
@benzaria benzaria requested a review from som-sm June 6, 2025 01:29
@sindresorhus
Copy link
Owner

Please run everything through AI to find typos, bugs, mistakes, and if there are any missing tests.

@benzaria
Copy link
Contributor Author

benzaria commented Jun 6, 2025

@som-sm can u review this !

@benzaria benzaria requested a review from sindresorhus June 7, 2025 14:13
@benzaria
Copy link
Contributor Author

benzaria commented Jun 8, 2025

@som-sm Ping... :)

@sindresorhus
Copy link
Owner

Please run everything through AI. Same with your other pull requests.

@benzaria benzaria requested a review from sindresorhus June 9, 2025 11:40
Copy link
Collaborator

@som-sm som-sm left a comment

Choose a reason for hiding this comment

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

@benzaria Please take the time to thoroughly check your PRs before requesting a review.

You've marked issues as resolved without actually addressing them. There's no rush, just make sure to fix the obvious issues before involving others.

@benzaria
Copy link
Contributor Author

benzaria commented Jun 9, 2025

@benzaria Please take the time to thoroughly check your PRs before requesting a review.

@som-sm So sorry for the mistake, we just had a Code Blue emergency in the block we needed to move fast.

@som-sm
Copy link
Collaborator

som-sm commented Jun 9, 2025

That’s fine, please take your time. Just make sure to double-check your work before requesting a review.

@benzaria
Copy link
Contributor Author

benzaria commented Jun 9, 2025

@som-sm I run it thru AI sanitizing any typos and bad grammar.

@som-sm
Copy link
Collaborator

som-sm commented Jun 9, 2025

I'll try to give it a proper read tomorrow.

BTW, these types should probably be suffixed with Rest instead of Spread. The TS handbook also refers to them as rest elements.
image

I'd also suggest suffixing them with Element, so SplitOnRestElement, ExtractRestElement & ExcludeRestElement.

@benzaria
Copy link
Contributor Author

benzaria commented Jun 9, 2025

Sure !

@benzaria benzaria changed the title Add SplitOnSpread, ExtractSpread, ExcludeSpread types Add SplitOnRestElement, ExtractRestElement, ExcludeRestElement types Jun 10, 2025
@benzaria benzaria requested a review from som-sm June 11, 2025 13:00
@benzaria
Copy link
Contributor Author

@som-sm I think I resolved all ur comments.

@benzaria
Copy link
Contributor Author

benzaria commented Jun 14, 2025

@som-sm @sindresorhus can u guys take a look i need to continue on Reverse #1167 and IndexOf... #1155

@benzaria benzaria requested a review from som-sm June 16, 2025 00:37
@benzaria
Copy link
Contributor Author

@som-sm Ready !

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.

3 participants