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

Syntax for maps #182

Merged
merged 1 commit into from Dec 11, 2014
Merged

Syntax for maps #182

merged 1 commit into from Dec 11, 2014

Conversation

@crm416
Copy link
Contributor

@crm416 crm416 commented Dec 9, 2014

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

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

@fkling fkling commented Dec 9, 2014

I think the ... just indicates an elision.

@crm416
Copy link
Contributor Author

@crm416 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
Copy link
Contributor

@gabelevi 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
Copy link
Contributor Author

@crm416 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants