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

Syntax for maps #182

Merged
merged 1 commit into from Dec 11, 2014

Conversation

Projects
None yet
3 participants
@crm416
Contributor

crm416 commented Dec 9, 2014

The current copy throws a syntax error for me. Maybe there's some implied context that I'm missing?

Charles Marsh
Syntax for maps
The current copy throws a syntax error for me. Maybe there's some implied context that I'm missing?
@fkling

This comment has been minimized.

Member

fkling commented Dec 9, 2014

I think the ... just indicates an elision.

@crm416

This comment has been minimized.

Contributor

crm416 commented Dec 10, 2014

Yeah, that was my first guess, but I found it confusing for two reasons:

  1. It's pretty similar to the JSX props transfer syntax.
  2. If you were actually preceding the [key:string]: number with anything, that 'anything' would end in a semicolon (I think?) and not a comma.
@gabelevi

This comment has been minimized.

Contributor

gabelevi commented Dec 11, 2014

Yeah, the fact that ... is a token in JS does make this a little confusing. Also that comma is 100% wrong.

gabelevi added a commit that referenced this pull request Dec 11, 2014

@gabelevi gabelevi merged commit 20196bc into facebook:gh-pages Dec 11, 2014

@crm416

This comment has been minimized.

Contributor

crm416 commented Dec 11, 2014

Cheers @gabelevi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment