Fail to get contextual type when an index signature exists #27949
Labels
Bug
A bug in TypeScript
Domain: Contextual Types
The issue relates to contextual types
Fixed
A PR has been merged for this issue
TypeScript Version: 3.2.0-dev.20181017
Code
Expected behavior:
No error.
Actual behavior:
src/a.ts:7:7 - error TS7006: Parameter 'x' implicitly has an 'any' type.
Was introduced by #27849. For some reason it only happens when
options
is a union. Discovered injquery
on DefinitelyTyped.The text was updated successfully, but these errors were encountered: