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

Add ReadonlyTuple type #383

Merged
merged 6 commits into from May 24, 2022
Merged

Conversation

Menecats
Copy link
Contributor

This pull-request adds an alternative solution for issue #284 as already discussed in PR #294

// @sindresorhus
// @darcyparker

@darcyparker
Copy link
Contributor

Looks good to me.

@@ -28,6 +28,8 @@ guestFencingTeam.push('Sam');
//=> error TS2339: Property 'push' does not exist on type 'FencingTeam'
```

@deprecated This type doesn't prevent you to access values outside the array length via index (see issue#284),
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure if it makes sense to deprecate this. Someone might want a mutable version. I think we should document how this differs from ReadonlyTuple though.

@sindresorhus sindresorhus merged commit f445cc6 into sindresorhus:main May 24, 2022
@Menecats Menecats deleted the new_readonly_tuple branch June 11, 2022 15:43
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.

None yet

3 participants