You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #45013: it's difficult to represent class "factories" like this one in type declarations.
The text was updated successfully, but these errors were encountered:
JoshuaKGoldberg
changed the title
Cannot represent class expression in type declaration: "Cannot find name 'class'"
Allow class expression in type declarations
Jul 13, 2021
JoshuaKGoldberg
changed the title
Allow class expression in type declarations
Allow class expressions in type declarations
Jul 13, 2021
Suggestion
π Search Terms
class expression declaration type
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
When a class is created by a static method, there doesn't seem to be a way to directly use it as a class type.
π Motivating Example
Implementation:
How I would expect the declaration to look, with the type error present now:
The declaration actually created:
π» Use Cases
Similar to #45013: it's difficult to represent class "factories" like this one in type declarations.
The text was updated successfully, but these errors were encountered: