something wrong about generator

2018-05-06 Thread
generator function shouldn't allow a "return value" when use yield or it need to return {value: {value: "end", done: true}, done: true} at the iter end when use yield* code: ``` javascript function* a() { yield 1; yield 2; return "end" } //undefined function* b() { yield* a() } //undefined c =

Re: the syntax let decorators ?

2018-01-21 Thread
tor should come before the > variable name: > > ``` > let @inc a = 1, > @inc b = 2; > ``` > > On Wed, 27 Dec 2017 at 10:48 郑宇光 <chendianb...@gmail.com> wrote: > >> do you like syntax like this >> >> ``` >> @inc >> let a = 1; >> &g

the syntax let decorators ?

2017-12-27 Thread
do you like syntax like this ``` @inc let a = 1; function inc(value) { return value + 1; } ``` I write a plugin to enable this syntax for test, [javascript let decorators](https://github.com/ukari/javascript-let-decorators) ___ es-discuss mailing