Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Object literal parameter gets incorrectly transpiled to optional parameters when object keys aren't strings #323

Open
@jsayol

Description

@jsayol

The following code

function foo(bar) {
  console.log(foo['hello']);
}

foo({hello: 'world'});

Gets incorrectly transpiled to

foo(bar) {
  console.log(foo["hello"]);
}

foo(hello: "world");

Only when the object keys are strings ( foo({'hello': 'world'}) ) the transpiler generates the correct output

foo(bar) {
  console.log(foo["hello"]);
}

foo({"hello": "world"});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions