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
Should we introduce stricter types for some of the properties of GoogleChart?
type: string could be replaced with the union of all keys (string literals) from CHART_TYPES. That would prevent typos but it would require a way to extend that union to support arbitrary visualization types (similarly to HTMLElementTagNameMap). Suggested by @rictic.
options: {}|undefined could be replaced with the union of all known options types from DefinitelyTyped google.visualization. For example: LineChartOptions|ColumnChartOptions.
cols: unknown[]|undeifned could be use DataObjectColumn
rows: unknown[][]|undefined could be use DataObjectRow
All those changes are likely to be breaking. We should weight the benefits they offer.
The text was updated successfully, but these errors were encountered:
Should we introduce stricter types for some of the properties of
GoogleChart
?type: string
could be replaced with the union of all keys (string literals) fromCHART_TYPES
. That would prevent typos but it would require a way to extend that union to support arbitrary visualization types (similarly toHTMLElementTagNameMap
). Suggested by @rictic.options: {}|undefined
could be replaced with the union of all known options types from DefinitelyTyped google.visualization. For example:LineChartOptions|ColumnChartOptions
.cols: unknown[]|undeifned
could be useDataObjectColumn
rows: unknown[][]|undefined
could be useDataObjectRow
All those changes are likely to be breaking. We should weight the benefits they offer.
The text was updated successfully, but these errors were encountered: