Skip to content

arrow function emit emit error #11377

Closed
Closed
@basarat

Description

@basarat

TypeScript Version: nightly latest

Code

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "noImplicitAny": false,
        "sourceMap": false,
        "lib": [
          "es6", "dom"
        ]
    },
    "exclude": [
        "node_modules"
    ]
}
const foo = (x: string) => null;

Expected behavior:

Gives js

var foo = function (x) { return null; };

Actual behavior:

var foo = function (x: string) { return null; };

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: TransformsRelates to the public transform APIFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions