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
I managed to confuse the ts language type hints, when you hover over the variables it shows a generic type, but forcing a type error on the same variable shows the correct type on the error.
This caused a couple hours of me looking over complex types trying to figure out why it showed me a variable as a generic one.
The behavior should be different in TS 2.9. you should be getting {} as a contextual type here since the type is generic, and inference will fail. you can however specify a type argument for your generic compoent: e.g.:
From @burabure on April 26, 2018 22:28
Issue Type: Bug
I managed to confuse the ts language type hints, when you hover over the variables it shows a generic type, but forcing a type error on the same variable shows the correct type on the error.
This caused a couple hours of me looking over complex types trying to figure out why it showed me a variable as a generic one.
Here's the code that reproduces the error:
using these deps for example:
VS Code version: Code 1.22.2 (3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9, 2018-04-12T16:34:44.222Z)
OS version: Linux x64 4.13.0-37-generic
System Info
Extensions (9)
(2 theme extensions excluded)
Copied from original issue: microsoft/vscode#48785
The text was updated successfully, but these errors were encountered: