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: incorrect types for inArray #1774

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

Conversation

Zamiell
Copy link

@Zamiell Zamiell commented Jan 9, 2024

when library functions take in arrays, the param should always be marked as readonly.
otherwise you force library users to use mutable data structures (bad) or perform manual type assertions (also bad).
if you like, i can suggest an eslint rule that will find this class of error in your codebase automatically.

@ellis
Copy link

ellis commented May 4, 2024

This patch would solve a big issue in my code base.

@ellemedit
Copy link

Is there any reason to not merge this? If rebase is required, I would want it.

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.

4 participants