Skip to content

Commit dfe9eb5

Browse files
committed
Update types
1 parent 9ea89bf commit dfe9eb5

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/types/data.d.ts renamed to src/types/data.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ export type LiveData = {
2121
visitors: number;
2222
};
2323

24-
export type ReportData = Array<{
24+
type ReportDataValue = { [value: string]: string | number };
25+
26+
export type ReportData = {
2527
[label: string]: string;
26-
values: Array<{ [value: string]: string | number }>;
27-
}>;
28+
// @ts-expect-error
29+
values: ReportDataValue[];
30+
}[];
2831

2932
export type MetricsMap = Record<Metrics, { label: string; value: string }>;
3033

src/types/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,3 @@ export type DashboardAnalyticsConfig = {
3939
afterDashboard?: DashboardWidgets[];
4040
};
4141
};
42-
43-
export { PlausibleProvider, GoogleProvider };

src/types/providers.d.ts renamed to src/types/providers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export interface PlausibleProvider {
55
host?: string;
66
}
77

8-
interface GoogleProvider {
8+
export interface GoogleProvider {
99
source: "google";
1010
propertyId: string;
1111
credentials?: string;

src/types/widgets.d.ts renamed to src/types/widgets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type Properties =
1717
| "country";
1818

1919
/* Keeping this for later */
20-
/* export type Reports = "topSources" | "topPages" | "topCountries"; */
20+
export type Reports = "topSources" | "topPages" | "topCountries";
2121

2222
export interface ChartWidget {
2323
type: "chart";

0 commit comments

Comments
 (0)