Microsoft/TypeScript

Improve errors for potential arrow functions

Open

#25,898 建立於 2018年7月24日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (6,726 fork)batch import
BugDomain: Error MessagesEffort: ModerateHelp Wanted

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

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.

貢獻者指南