Add support for concise methods #955

Closed
rwaldron opened this Issue Mar 22, 2013 · 3 comments

Comments

Projects
None yet
2 participants
Owner

rwaldron commented Mar 22, 2013

let o = {
  foo() {
    return "no 'function' needed";
  }
};

console.log( o.foo() ); // "no 'function' needed"
Contributor

guyzmo commented Mar 28, 2013

is it part of es6 draft?

Owner

rwaldron commented Mar 28, 2013

Yes, 13.3 of ES6-draft, but here is the syntax definition:

MethodDefinition :
    PropertyName ( FormalParameterList ) { FunctionBody }
    * PropertyName  ( FormalParameterList ) { FunctionBody }

(Can be a generator as well)

Contributor

guyzmo commented Mar 29, 2013

ok, done

valueof closed this in 8c1cf12 Apr 9, 2013

@jugglinmike jugglinmike added a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014

@guyzmo @jugglinmike guyzmo + jugglinmike Added support for concise methods declaration in objects.
Closes GH-975.
Closes GH-955.
96682c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment