Commit graph

29 commits

Author SHA1 Message Date
Anders Hejlsberg
f19191b081 Add tests 2019-02-19 07:02:50 -10:00
Anders Hejlsberg
710826e37e Add regression test 2019-02-11 09:46:02 -08:00
Anders Hejlsberg
48c0aedf54 Add tests 2018-11-02 08:20:06 -07:00
Nathan Shively-Sanders
c929e74310
Add [Constructor]Parameter types to lib.d.ts (#26243) 2018-08-31 07:46:16 -07:00
Anders Hejlsberg
676892ee56 Add tests 2018-08-25 07:55:13 -07:00
Anders Hejlsberg
1aa2b15f8c Add regression test 2018-07-25 12:42:47 -07:00
Anders Hejlsberg
55180f7725 Add tests 2018-07-12 07:07:13 -10:00
Anders Hejlsberg
e5d520e463 Add tests 2018-07-02 17:50:42 -10:00
Anders Hejlsberg
d869e56d33 Add tests 2018-06-25 10:45:38 -10:00
Anders Hejlsberg
9cd8eadfd2 Update tests 2018-06-24 14:32:50 -10:00
Anders Hejlsberg
0cc0fad381 Add tests 2018-06-14 13:06:37 -07:00
Nathan Shively-Sanders
3631af6486
Remove readonly from object rest properties (#23746)
* Remove readonly from object rest properties

Works the same as removing it from object spread properties

* Fix bug number in test
2018-04-27 14:54:59 -07:00
Nathan Shively-Sanders
458e87824b ES5:Emit parameter initialiser before object rest destructuring
Fix #14026, where ES5 emit for a parameter with

1. a default value initialiser
2. an object binding pattern containing an object rest

incorrectly emitted the destructuring for the object rest before the
default value initialisation.

This happened because, during emit, the ES next transform runs first,
transforming object rest destructuring and marking it as part of the
function prologue. Then the ES5 transform runs and transforms the
default initialiser, also marking it as part of the prologue. Then the
prologue is emitted in the order the statements were added.

The fix is to not mark the object rest destructuring as part of the
prologue. I'm not 100% sure that this is the right fix, but it fixes the
bug as it stands today.

Here's an example:

```ts
function foobar({ bar={}, ...opts }: any = {}) { }
```

which should have the ES5 emit:

```js
function foobar(_a) {
  if (_a === void 0) { _a = {}; }
  var _b = _a.bar, bar = _b === void 0 ? {} : _b, opts = __rest(_a, ["bar"]);
}
```
2017-02-15 08:40:23 -08:00
Nathan Shively-Sanders
34fa27895f Merge branch 'master' into property-access-for-string-index-sigs 2017-01-18 08:29:38 -08:00
Nathan Shively-Sanders
c9e301f236 Test:object rest skips only class methods
Previously, it skipped all methods.
2017-01-10 08:55:15 -08:00
Nathan Shively-Sanders
fe3ed12a20 Update tests and baselines 2016-12-05 09:58:33 -08:00
Nathan Shively-Sanders
77226318ef Update baselines 2016-11-30 17:26:30 -08:00
Nathan Shively-Sanders
8e648f9f6d Add property access and --noImplicitAny tests
And update baselines
2016-11-30 13:14:52 -08:00
Nathan Shively-Sanders
f85ca9c395 Test that rest of untyped binding pattern is any 2016-11-29 13:50:56 -08:00
Nathan Shively-Sanders
641948fb0c Test assignability checking of object rests 2016-11-16 13:41:18 -08:00
Ron Buckton
ba4f52c055 Merge remote-tracking branch 'origin/object-rest-emit-for-method-and-accessor-parameters' into streamlineDestructuring 2016-11-15 17:09:49 -08:00
Nathan Shively-Sanders
2496756aed Merge branch 'master' into object-spread-rest-fixes 2016-11-15 11:19:01 -08:00
Nathan Shively-Sanders
498d978c21 Test object rest parameter emit: methods/accessors 2016-11-15 09:55:56 -08:00
Nathan Shively-Sanders
fe66d9ef9f Add spread tests and update rest tests 2016-11-14 16:23:40 -08:00
Nathan Shively-Sanders
0adc76bd2b Test object spread+async emit & nested spread emit 2016-11-14 08:54:32 -08:00
Nathan Shively-Sanders
de9f59a301 Test non-identifier rest in destructuring assignment 2016-11-11 08:57:11 -08:00
Nathan Shively-Sanders
01969475cf Improve nested destructuring test for ESNext emit
Now with object destructuring inside array destructuring inside object
destructuring! Each with their own array/object rest!

Also updates baselines.
2016-11-09 10:51:56 -08:00
Nathan Shively-Sanders
14f8b9990f Update objectRestAssignment test
Missed previously, just got the baselines
2016-11-03 13:33:16 -07:00
Nathan Shively-Sanders
ac20b46f4f Add rest tests 2016-11-02 14:56:58 -07:00