- adds `get` and `set` kind in addition to `method` to the list of allowed class members for having a decorator,
- adds tests for this two cases (decorator + set and decorator + get)
Similar to the fixes in https://github.com/babel/babel/pull/6580 and
https://github.com/babel/babel/pull/6581, accesses of the form
```js
stack[stack.length - 1];
```
when `stack` can be an empty array are pretty bad for performance.
In this case it also breaks the type safety, since the function
`last<T>` is declared to only return values of type `T`, but
occasionally also returns `undefined` now, since the `stack` parameters
passed to it never contain a property `"-1"` and neither do the
`Object.prototype` or the `Array.prototype`.
This is a non-breaking performance fix, which adds proper checking
to ensure that `last` is only invoked on non-empty arrays.
Amusingly the pipeline OP "breaks" the readme formatting because Markdown likes the `|` character a bit too much. Escaping the `|` fixes this and makes the readme display properly
* Re-name uncatagorised 1 and 2
* Move to es2015
* Add expected.json to parenthesized lhs object
* Orginize into parenthesized-lhs-array and parenthesized-lhs-object
* Remove uncategorised/33 because it was repeditive decorators/class-decorator
* Move uncatagorised/34 to decorators/class-decorator-assignment
* Move uncategorised/35 to decorators/method-decorator
* Move uncategorised/36 to decorators/class-decorator-setter
* Move uncategorised/37 to decorators/class-decorator-getter
* Move uncategorised/38 to decorators/class-decorators-multiple
* Clean up syntax
* Move uncategorised/39 to decorators/object-decorator
* Remove syntax in order to pass tests
* Re-add uncategorisd/33 as decorators/class-decorator-new-line
* Move class-decorator-new-line to class-decorator-same-line
This separates `classPrivateMethods`'s dependency on
`classPrivateProperties`. It also starts a `PrivateName` at the hash
symbol, not the `Identifier`.
They were not needed since c4fb3fe742c61ee2dd0ab1b1197a254d3c9f6a55
because now each files declare a new class
instead of adding method to the existing one.