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

feat(array/types): Flat respects non-tuple arrays #103

Merged
merged 2 commits into from
May 31, 2023
Merged

feat(array/types): Flat respects non-tuple arrays #103

merged 2 commits into from
May 31, 2023

Conversation

pskfyi
Copy link
Owner

@pskfyi pskfyi commented May 30, 2023

Turns out the current implementation only handles tuples. T extends [infer Head, infer ...Tail] only pattern-matches against strings and tuples, where the 0th element can be inferred from the rest. Separate handling is required for non-tuple arrays, which this PR provides alongside examples.

@pskfyi pskfyi marked this pull request as ready for review May 30, 2023 07:29
@pskfyi pskfyi requested a review from AustinArey May 30, 2023 07:30
@pskfyi pskfyi mentioned this pull request May 30, 2023
22 tasks
Copy link
Collaborator

@AustinArey AustinArey left a comment

Choose a reason for hiding this comment

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

Good find/fix

@AustinArey AustinArey merged commit 329912e into main May 31, 2023
@AustinArey AustinArey deleted the flat branch May 31, 2023 01:38
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.

2 participants