Skip to content

Can't parse foo! += 1 #64

@paoloricciuti

Description

@paoloricciuti

If i try to parse the expression in the title i get an error despite it being a valid typescript syntax.

Syntax:

let foo: number | null  = 1;
foo! += 1;

Error:

Error: Assigning to rvalue (3:0)

Repo:
link

Related issue:

sveltejs/svelte#13409

We are using acorn-typescript in svelte to parse typescript scripts and this bug was reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions