Skip to content

Improve errors for potential arrow functions #25898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DanielRosenwasser opened this issue Jul 24, 2018 · 1 comment
Open

Improve errors for potential arrow functions #25898

DanielRosenwasser opened this issue Jul 24, 2018 · 1 comment
Labels
Bug A bug in TypeScript Domain: Error Messages The issue relates to error messaging Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this
Milestone

Comments

@DanielRosenwasser
Copy link
Member

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.
@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Help Wanted You can do this Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Domain: Error Messages The issue relates to error messaging labels Jul 24, 2018
@DanielRosenwasser DanielRosenwasser added this to the Community milestone Jul 24, 2018
@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
@DanielRosenwasser
Copy link
Member Author

#39548 is sorta related to this because it's about parsing arrow function types in union types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Error Messages The issue relates to error messaging Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants