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
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Problem
During object declaration, there is no way to explicitly define a property literal type:
Here
typeof obj
is{ hello: string }
Example of Use Case
In the case of a Redux Action, which will be constant, I expect
type
property to be a literal type:Current Workaround
It's possible to explicitly define the literal type after the value:
Which causes two problems:
'foo' as 'bar'
will work)readonly
would be a solution, but does not seem to be compatible with object declaration syntax.The text was updated successfully, but these errors were encountered: