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

String literal keys for object type aliases #161

Closed
charliermarsh opened this issue Dec 1, 2014 · 4 comments
Closed

String literal keys for object type aliases #161

charliermarsh opened this issue Dec 1, 2014 · 4 comments

Comments

@charliermarsh
Copy link

When I try:

type MyType = {
  'foo-bar': number;
};

Flow gives me the "Unsupported key in object type" error. Changing 'foo-bar' to, e.g., fooBar fixes the issue. Is there any way to use string literal keys in this case?

(First experience with Flow, so apologies in advance if I've messed up any of the nomenclature.)

@lordhoto
Copy link
Contributor

lordhoto commented Dec 3, 2014

We will try to address this very soon. I have an change up for review internally already.

@lordhoto
Copy link
Contributor

lordhoto commented Dec 4, 2014

The fix should be in the next time we update the repo with our internal changes. I'll keep it open till then.

@charliermarsh
Copy link
Author

@lordhoto thanks! Appreciate the update.

@gabelevi
Copy link
Contributor

gabelevi commented Mar 3, 2015

This looks fixed :)

@gabelevi gabelevi closed this as completed Mar 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants