Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpopus committed Apr 16, 2023
1 parent 9ea89bf commit dfe9eb5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
9 changes: 6 additions & 3 deletions src/types/data.d.ts → src/types/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ export type LiveData = {
visitors: number;
};

export type ReportData = Array<{
type ReportDataValue = { [value: string]: string | number };

export type ReportData = {
[label: string]: string;
values: Array<{ [value: string]: string | number }>;
}>;
// @ts-expect-error
values: ReportDataValue[];
}[];

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

Expand Down
2 changes: 0 additions & 2 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,3 @@ export type DashboardAnalyticsConfig = {
afterDashboard?: DashboardWidgets[];
};
};

export { PlausibleProvider, GoogleProvider };
2 changes: 1 addition & 1 deletion src/types/providers.d.ts → src/types/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface PlausibleProvider {
host?: string;
}

interface GoogleProvider {
export interface GoogleProvider {
source: "google";
propertyId: string;
credentials?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/types/widgets.d.ts → src/types/widgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type Properties =
| "country";

/* Keeping this for later */
/* export type Reports = "topSources" | "topPages" | "topCountries"; */
export type Reports = "topSources" | "topPages" | "topCountries";

export interface ChartWidget {
type: "chart";
Expand Down

0 comments on commit dfe9eb5

Please sign in to comment.