Skip to content

Incorrect Span on BindingIdentifier  #4739

@DonIsaac

Description

@DonIsaac

Spans for binding identifiers cover the identifier itself and the type annotation on BindingPattern. This was introduced in #2624, and is blocking oxc-project/backlog#84.

Expected Behavior

//    ___________ BindingPattern
const foo: number = 1
//    ^^^-------- TSTypeAnnotation
//    ^^^BindingIdentifier

Actual Behavior

//    ___________ BindingPattern and BindingIdentifier
const foo: number = 1
//       -------- TSTypeAnnotation

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-astArea - ASTA-parserArea - ParserC-bugCategory - Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions