-
Notifications
You must be signed in to change notification settings - Fork 13.4k
TS2775 when using arrow function for type predicate #45919
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do thisYou can do this
Milestone
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do thisYou can do this
Bug Report
Our shop prefers arrow function style and JSDoc annotations. I've got a type predicate that works as a function declaration but as an arrow function, I get 2775
🔎 Search Terms
🕗 Version & Regression Information
Version 4.2.3 (and whatever version the playground runs)
⏯ Playground Link
error
💻 Code
🙁 Actual behavior
🙂 Expected behavior
same as when I change the arrow function to a function declaration:
no error