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
Infer literal types for properties of "frozen" object. See example below
Use Cases
Moving project from flow to typescript. Common pattern to define enums in flow is freezing an object and using union of a value types as the enum type:
Search Terms
Object.freeze, literal types
Suggestion
Infer literal types for properties of "frozen" object. See example below
Use Cases
Moving project from flow to typescript. Common pattern to define enums in flow is freezing an object and using union of a value types as the enum type:
Currently same pattern in typescript will result in
string
.Examples
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: