Skip to content

Source maps for single-identifier arrows functions map the binding identifier to the whole function header  #22834

@loganfsmyth

Description

@loganfsmyth

Search Terms:
source maps

Code

const fn = (arg) => {
};
const fn2 = arg2 => {
};

Expected behavior:
Source maps should both map the argument binding identifier to the location of the new binding.

Actual behavior:
The arrow that doesn't have parens maps the arg2 binding to the whole function header.
screen shot 2018-03-21 at 5 30 45 pm
vs
screen shot 2018-03-21 at 5 30 34 pm

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions