Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Row interface definition #297

Closed
oobayly opened this issue Feb 23, 2023 · 4 comments · Fixed by #313
Closed

Expand Row interface definition #297

oobayly opened this issue Feb 23, 2023 · 4 comments · Fixed by #313
Labels
feature New feature or request

Comments

@oobayly
Copy link
Contributor

oobayly commented Feb 23, 2023

Feature request

The interface definition for Row should also include the type {v: any, f: any} - see Cell Objects

Describe the solution you'd like

Update the Row interface

-export type Row = (string | number | Date | null)[];
+export type Row = (string | number | Date | { v: string | number | Date | null, f: string | null } | null)[];

I've added this into #296.

Describe alternatives you've considered

n/a

Additional context

n/a

@oobayly oobayly added the feature New feature or request label Feb 23, 2023
oobayly added a commit to tipstrade/angular-google-charts that referenced this issue Feb 23, 2023
@oobayly oobayly mentioned this issue Feb 23, 2023
5 tasks
@kussmaul
Copy link
Contributor

Please add boolean as a valid data type, too.

FERNman pushed a commit that referenced this issue Sep 1, 2024
* revert Downgrade to angular 13

* feat: update to peer dependencies to 15.x

* fix: don't allow circleci to modify package-lock.json

* feat: fix wordtree type

See: #248

* feat: expand Row interface definition

See #297
@FERNman
Copy link
Owner

FERNman commented Sep 2, 2024

@kussmaul I've checked the google.visualization typings, they simply use any as the type. Probably they actually only allow primitives and Date (and no custom objects), but I'm not even sure about that.

Would you prefer sticking with the current typing (adding boolean to support all primitives), or simply switch to any to be more flexible? I'm leaning toward the latter. The resulting type would be

export type Row = (any | google.visualization.DataObjectCell)[];

@FERNman FERNman linked a pull request Sep 2, 2024 that will close this issue
@kussmaul
Copy link
Contributor

kussmaul commented Sep 2, 2024

@FERNman using any seems reasonable, especially since it matches google.visualization.

@FERNman
Copy link
Owner

FERNman commented Sep 2, 2024

@kussmaul great, then I'll go ahead and merge the PR! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants