-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gracefully handle "property is missing in interface with index signature"? #17223
Comments
Why aren't you just using Is it just because AnyAction gives you code completion for "type"? In any case, I wouldn't want the language to allow this as it would make indexed types useless (they would all turn into type |
That's exactly what I thought! |
TypeScript Version: 2.4.1
Code
Expected behavior:
Maybe no error?
I'm not sure if there's any graceful solution to this problem, I mean without using 'any' type assertion.
Actual behavior:
Type 'AnyAction' is not assignable to type 'RouterAction'.
Property 'payload' is missing in type 'AnyAction'.
The text was updated successfully, but these errors were encountered: