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
type '{ legend: string; }' is not assignable to type 'LineChartOptions'.
Actual behavior:
error TS2345: Build:Argument of type 'DataTable' is not assignable to parameter of type 'DataView'.
Note: draw has two overloads, one with DataTable and one with DataView. It seems when reporting the error, TS incorrectly chooses the overload with DataView.
However, when hovering over draw, VS displays the correct overload that accepts a DataTable:
EDIT: It seems the "wrong" overload is a side effect of another error, the incompatibility of LineChartOptions (ChartLegend is an interface with only optional members, so in previous versions, a string was assignable to it).
Still, I think the error should not report an error of DataTable not being assignable to DataView here.
Thanks!
The text was updated successfully, but these errors were encountered:
kpreisser
changed the title
Incorrect overload resolution in 2.4.1
Misleading overload resolution error in 2.4.1
Jun 28, 2017
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 2.4.1
Code
Expected behavior:
Actual behavior:
Note:
draw
has two overloads, one withDataTable
and one withDataView
. It seems when reporting the error, TS incorrectly chooses the overload withDataView
.However, when hovering over

draw
, VS displays the correct overload that accepts aDataTable
:EDIT: It seems the "wrong" overload is a side effect of another error, the incompatibility of
LineChartOptions
(ChartLegend
is an interface with only optional members, so in previous versions, astring
was assignable to it).Still, I think the error should not report an error of
DataTable
not being assignable toDataView
here.Thanks!
The text was updated successfully, but these errors were encountered: