Skip to content

Improve errors for potential arrow functions #25898

Open
@DanielRosenwasser

Description

@DanielRosenwasser

There are certain locations where arrow functions don't parse

var x = window.foo || () => {}

In these instances, it would be nice if users could get a better error message as to avoid issues like #25897.

Ideally this should not be an invasive change.

  • The change should be limited in scope.
  • The parser should continue erroring in those locations.
  • The change must not introduce change how existing valid code is parsed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions