Skip to content

Commit

Permalink
fix(types): Fix Chart.load({ json }) typing
Browse files Browse the repository at this point in the history
Fix type for json to accept array elements

Close #2711
  • Loading branch information
kageurufu authored and netil committed Jun 2, 2022
1 parent 8788306 commit 1bd4f4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ Justin-Moon <https://github.com/Justin-Moon>
Haung Lee <https://github.com/HanungLee>
Chunmyong Park <chunmyong.park@kaist.ac.kr>
neilnaveen <https://github.com/neilnaveen>
Frank Tackitt <franklyn@tackitt.net>
4 changes: 2 additions & 2 deletions types/chart.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export interface Chart {
load(this: Chart, args: {
append?: boolean;
url?: string;
json?: [{ [key: string]: string | number }] | {[key: string]: Array<string|number>};
json?: Array<{[key: string]: string | number }> | {[key: string]: Array<string | number>};
rows?: PrimitiveArray[];
columns?: PrimitiveArray[];
data?: Array<{ [key: string]: number }>;
Expand All @@ -358,7 +358,7 @@ export interface Chart {
axes?: { [key: string]: string | string[] };
colors?: { [key: string]: string };
headers?: { [key: string]: string };
keys?: { [key: string]: string };
keys?: { [key: string]: string | string[] };
mimeType?: string;
type?: string;
types?: { [key: string]: string };
Expand Down

0 comments on commit 1bd4f4a

Please sign in to comment.