Microsoft/TypeScript

Improve errors for potential arrow functions

Open

#25.898 aberto em 24 de jul. de 2018

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (6.726 forks)batch import
BugDomain: Error MessagesEffort: ModerateHelp Wanted

Métricas do repositório

Stars
 (48.455 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)

Description

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.

Guia do colaborador