
[microsoft/TypeScript] Generator functions trigger TS80002 (Issue #62056)
DRANK
0f-0b created an issue (microsoft/TypeScript#62056) ### 🔎 Search Terms convert to class, 80002 ### 🕗 Version & Regression Information - This is the behavior in every version I tried, and I reviewed the FAQ for entries about generators. ### ⏯ Playground Link https://www.typescriptlang.org/play/?target=99&filetype=js#code/GYVwdgxgLglg9mAVAAgOYFMwAoCUyDeAvgFAZgB0ADgE5xR0Cel65Y6AHlMgLxqZW16UJizacA3KX406jZuWrooIamB58KMoSIVKVYSUA ### 💻 Code ```js function* gen() {} gen.prototype.next = gen.prototype.next; gen.prototype.return = gen.prototype.return; ``` ### 🙁 Actual behavior There is a diagnostic on line 1 saying “this constructor function may be converted to a class declaration”, but `gen` is not a constructor. ### 🙂 Expected behavior No diagnostic. ### Additional information about the issue _No response_ -- Reply to this email directly or view it on GitHub: https://github.com/microsoft/TypeScript/issues/62056 You are receiving this because you are subscribed to this thread. Message ID: <microsoft/TypeScript/issues/62056@github.com>
👀👀
👀�github.com/microsoft/Type…Ze