Get name of declaration uniformly, even for JS-style assignment declarations. by sandersn · Pull Request #15594 · microsoft/TypeScript

added 2 commits

May 4, 2017 16:12
JS-style assignment declarations have a name, but it's not stored on the
name property of the BinaryExpression. This commit adds
`getNameOfDeclaration` to uniformly get the name of a declaration.

It also reworks the declaration of `Declaration` so that accessing
`name` is an error unless the type does *not* include
BinaryExpression.

mhegazy

mhegazy

rbuckton

rbuckton

@sandersn

Slows down compilation another 3%, so I'm not sure we'll want to take
this change.

This was referenced

May 8, 2017

@sandersn

This PR included a fix that I already checked in this morning.

rbuckton

@sandersn

rbuckton

@sandersn sandersn deleted the get-name-of-declaration-wrapper branch

May 10, 2017 15:08

@ghost ghost mentioned this pull request

May 22, 2017

@microsoft microsoft locked and limited conversation to collaborators

Jun 14, 2018