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

Use 'Object.freeze' consistently on all exported Array/Object constants #1906

Merged
merged 1 commit into from May 24, 2019

Conversation

IvanGoncharov
Copy link
Member

@IvanGoncharov IvanGoncharov commented May 24, 2019

We already using 'Object.freeze' for many constants, e.g.:

export const DirectiveLocation = Object.freeze({

export const Kind = Object.freeze({

export const TokenKind = Object.freeze({

It helps to solve some issues with Flow since without Object.freeze it assumes that constants can be mutated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature 🚀 requires increase of "minor" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant