Opened 4 years ago

Closed 3 years ago

#2138 closed change (rejected)

Support shorthand object literals in JSHydra

Reported by: sebastian Assignee:
Priority: P4 Milestone:
Module: Automation Keywords:
Cc: trev Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working:
Review URL(s):

Description

Background

JSHydra doesn't support the shorthand syntax for object literals, where property names are identical to the variable names they are initialized from, e.g:

let a = 1;
let b = 2;
let o = {a, b}

I found doing that quite often in functions passing multiple return values wrapped into an object.

What to change

Make JSHydra convert {a, b} into:

{a: a, b: b}

Also support mixing of explicit and implicit property inilization. So {a, b: 42}should be converted to:

{a: a, b: 42}

Change History (1)

comment:1 Changed 3 years ago 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.

Note: See TracTickets for help on using tickets.