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

broaden type Row in chart-base.component.ts #302

Closed
kussmaul opened this issue Sep 1, 2023 · 1 comment
Closed

broaden type Row in chart-base.component.ts #302

kussmaul opened this issue Sep 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@kussmaul
Copy link
Contributor

kussmaul commented Sep 1, 2023

Bug Report

Description

I am using angular-google-charts 2.2.3 with typescript 5.1.6 and angular 16.2.2.

The file chart-base.component.ts defines type Row:
export type Row = (string | number | Date | null)[];

Please expand the options to include boolean and { v: any, f: string } (for formatters, as described in README.md). Currently, I get errors like the one shown below when passing data with booleans and/or formatters to <dashboard> or <google-chart>, although if I suppress the errors using $any() the data is accepted and works correctly.

Type 'MyData[]' is not assignable to type 'Row[]'.
    Type 'MyData' is not assignable to type 'Row'.
      Type 'string | boolean | Date' is not assignable to type 'string | number | Date | null'.
        Type 'false' is not assignable to type 'string | number | Date | null'.ngtsc(2322)
@kussmaul kussmaul added the bug Something isn't working label Sep 1, 2023
@kussmaul
Copy link
Contributor Author

duplicate of #297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant