Skip to content

Docs: Document usage of object shorthand creation #5133

@phil294

Description

@phil294

Input Code

foo = 
  bar
  c: 3

Expected Behavior

I would expect it to compile to

foo = {
   bar,
   c: 3
}

It's common object shorthand notation, after all.

Current Behavior

It has been discussed in #4600 (comment), is not supported. You will need braces around the object body, if I am not mistaken.

Possible Solution

This should be addressed in the documentation. After thorough reading I had assumed there was nothing further to consider.

  • CoffeeScript version: Liveedit on coffeescript.org.

Edit:
Sorry Geoffrey, I must have missed the notification... this really should have been a PR after all

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions