-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Fails to get contextual type for string literal in array #19837
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
Comments
@weswigham can you please take a look. |
So this is definitely fixed by #19587 (so that's good, there's already a fix up), however I'm unsure as to how #19733 would be the change that broke it... I could easily see how #17668 could break it, though (and I just doubled checked, it is broken at d6436f1 (the Long story short, this actually should never have worked under our current contextual typing rules, if not for a bug in our lack-of-handling-unions-correctly (which made it so that we never saw the index signature on We could do one of a few things:
|
TypeScript Version: 2.7.0-dev.20171108
Code
Expected behavior:
No error.
Actual behavior:
Was broken by #19733 -- verified by testing with its merge commit and with the previous commit. @weswigham
Detected by running DefinitelyTyped tests.
The text was updated successfully, but these errors were encountered: