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

fix, cleanup, and tighten type programming utils #710

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

Conversation

nonergodic
Copy link
Collaborator

@nonergodic nonergodic commented Oct 5, 2024

The branch name is outdated. Initially intended to only add the one function that I needed, but then realized various issues in the code (primarily the usage of RoArray, when Tuple types were expected and "generic" RoArray that were not tuples under the hood actually produced incorrect results).

Types are now handled more appropriately and robustly.
e.g.

const arr = [[1,2], [3,4]];
const zipped = zip(arr); //previously had type never[], now has type RoArray2D<number>

The main downside is that compile time has gone up significantly (by 15 seconds, from 55s to 70s on my machine).

@nonergodic nonergodic marked this pull request as draft October 5, 2024 21:30
@nonergodic nonergodic marked this pull request as ready for review October 7, 2024 03:59
@nonergodic nonergodic changed the title add excludeIndexes function implementation to array utils fix, cleanup, and tighten type programming utils Oct 7, 2024
@artursapek
Copy link
Collaborator

this dude's frontal lobe bigger than my entire brain

@nonergodic
Copy link
Collaborator Author

this dude's frontal lobe bigger than my entire brain

Yes, it's all very impressive.

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