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
{{ message }}
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
Generated the js-interop facade for Google visualization api and is missing the imp factory constructors for google chart types. All it has is the fakeConstructor$ instead one with HTMLElement . This makes the generated facade useless. As a workaround, I had to manually add the factory constructors for most of the chart types.
Issue #1.
Ignore the fakeConstructor$. It was there originally to avoid analyzer warnings and is not the reason why the actual PieChart constructor is missing. I have a CL in progress that fixes the actual issue which is that we aren't matching the JS semantics that constructors from base classes also exist on subclasses.
Issue #2.
Answer depends on what happens with supporting those features generally in Dart code. If Dart supports unions and overloads we will just use that syntax. If it becomes clear Dart will not support them we will look to add custom syntax that only applies for JS interop facades likely using the comment syntax you see now.
external open class LineChart : CoreChartBase {
open fun draw(data: DataTable, options: LineChartOptions): Unit = definedExternally
open fun draw(data: DataView, options: LineChartOptions): Unit = definedExternally
}
I hope dart can also solve this issue elegentely 😉
Generated the js-interop facade for Google visualization api and is missing the imp factory constructors for google chart types. All it has is the fakeConstructor$ instead one with
HTMLElement
. This makes the generated facade useless. As a workaround, I had to manually add the factory constructors for most of the chart types.Sample App
I am not sure why we need the
fakeConstructor$
, is it just to satisfy the inheritance hierarchy?Also, one of the other major pain point is missing type info from the generated facade.
Since dart doesn't support method overriding or union types, this
dynamic
conversion make it less type safe. Is there any plan to fix it?The text was updated successfully, but these errors were encountered: