Opened on 09/16/2016 at 12:11:53 PM

Closed on 01/13/2017 at 10:09:29 AM

#4443 closed change (rejected)

Add support for the spread operator to jshydra

Reported by: kzar Assignee:
Priority: P3 Milestone:
Module: Automation Keywords: jshydra
Cc: sebastian, trev Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by trev)

Background

Since we already transpile a bunch of our JavaScript code, why not also add support for the spread operator?

What to change

Add support for the spread operator to jshydra. For example:

[1, ...[2, 3], 4];

  |
  v

[1].concat([2, 3]).concat([4]);
Math.max(...[1, 2]);

  |
  v

Math.max.apply(Math.max, [1, 2]);
foo(1, ...[2, 3], 4);

  |
  v

foo.apply(null, [1].concat([2, 3]).concat([4]));

Attachments (0)

Change History (3)

comment:1 Changed on 09/16/2016 at 12:22:40 PM by sebastian

  • Priority changed from Unknown to P3
  • Ready set

comment:2 Changed on 09/17/2016 at 06:34:15 PM by trev

  • Description modified (diff)

I've modified the examples to show how the code needs to be converted. The way I am setting the first parameter to apply() isn't entirely correct but should be good enough for us.

comment:3 Changed on 01/13/2017 at 10:09:29 AM by sebastian

  • Resolution set to rejected
  • Status changed from new to closed

jsHydra is no longer maintained, as we don't transpile the code anymore.

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.