Update parameter names and add Node.js type definitions
Renamed `url` to `path` in `trackPageView` method to reflect its actual use. Added `@types/node` package to the dependencies for improved type safety and development experience.
This commit is contained in:
@@ -16,7 +16,8 @@
|
||||
"@kit/eslint-config": "workspace:*",
|
||||
"@kit/prettier-config": "workspace:*",
|
||||
"@kit/tailwind-config": "workspace:*",
|
||||
"@kit/tsconfig": "workspace:*"
|
||||
"@kit/tsconfig": "workspace:*",
|
||||
"@types/node": "^22.1.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
||||
@@ -77,9 +77,9 @@ export function createAnalyticsManager<T extends string, Config extends object>(
|
||||
);
|
||||
},
|
||||
|
||||
trackPageView: (url: string) => {
|
||||
trackPageView: (path: string) => {
|
||||
return Promise.all(
|
||||
getActiveServices().map((service) => service.trackPageView(url)),
|
||||
getActiveServices().map((service) => service.trackPageView(path)),
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ interface TrackEvent {
|
||||
}
|
||||
|
||||
interface TrackPageView {
|
||||
trackPageView(url: string): Promise<unknown>;
|
||||
trackPageView(path: string): Promise<unknown>;
|
||||
}
|
||||
|
||||
interface Identify {
|
||||
|
||||
Reference in New Issue
Block a user