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 readonly typings for Set and Map similar to ReadonlyArray #10919

Closed
gmoothart opened this issue Sep 14, 2016 · 0 comments
Closed

Add readonly typings for Set and Map similar to ReadonlyArray #10919

gmoothart opened this issue Sep 14, 2016 · 0 comments
Labels
Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript

Comments

@gmoothart
Copy link
Contributor

Array has a companion ReadonlyArray type with all the mutation methods removed. There should be similar versions for the es6 collections Set and Map in es2015.collection.d.ts.

The benefit of this change is that it would allow you to express a collection which is not changed after initialization

@mhegazy mhegazy added Suggestion An idea for TypeScript Help Wanted You can do this labels Sep 14, 2016
@mhegazy mhegazy added this to the TypeScript 2.1 milestone Sep 15, 2016
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Sep 15, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants