Files
test-repo/tests/generator/anonymous.js
T
b47f7bae43 RFC: Always add a space after the function keyword (#3903)
* Always add a space after the `function` keyword

* WIP update snapshots

* WIP put generator function asterisk before space

https://github.com/prettier/prettier/issues/3847#issuecomment-363449250

* WIP update snapshots

* Add changelog

* Add tests for anonymouse generator function

* print space between `function` and generator star

* update changelog

* print space between yield and *

Co-authored-by: Joseph Frazier <1212jtraceur@gmail.com>
Co-authored-by: Sosuke Suzuki <aosukeke@gmail.com>
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-01-20 16:26:47 +02:00

22 lines
206 B
JavaScript

const f1 = function* () {
yield 0;
};
const f2 = function * () {
yield 0;
};
const f3 = function* () {
};
(function* () {
yield 0;
});
(function * () {
yield 0;
});
(function* () {
});