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 {
|
||||
|
||||
13
pnpm-lock.yaml
generated
13
pnpm-lock.yaml
generated
@@ -235,6 +235,9 @@ importers:
|
||||
'@kit/tsconfig':
|
||||
specifier: workspace:*
|
||||
version: link:../../tooling/typescript
|
||||
'@types/node':
|
||||
specifier: ^22.1.0
|
||||
version: 22.1.0
|
||||
|
||||
packages/billing/core:
|
||||
devDependencies:
|
||||
@@ -4018,9 +4021,6 @@ packages:
|
||||
'@types/eslint@8.56.10':
|
||||
resolution: {integrity: sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==}
|
||||
|
||||
'@types/eslint@9.6.0':
|
||||
resolution: {integrity: sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==}
|
||||
|
||||
'@types/estree-jsx@1.0.5':
|
||||
resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==}
|
||||
|
||||
@@ -11337,7 +11337,7 @@ snapshots:
|
||||
|
||||
'@types/eslint-scope@3.7.7':
|
||||
dependencies:
|
||||
'@types/eslint': 9.6.0
|
||||
'@types/eslint': 8.56.10
|
||||
'@types/estree': 1.0.5
|
||||
|
||||
'@types/eslint@8.56.10':
|
||||
@@ -11345,11 +11345,6 @@ snapshots:
|
||||
'@types/estree': 1.0.5
|
||||
'@types/json-schema': 7.0.15
|
||||
|
||||
'@types/eslint@9.6.0':
|
||||
dependencies:
|
||||
'@types/estree': 1.0.5
|
||||
'@types/json-schema': 7.0.15
|
||||
|
||||
'@types/estree-jsx@1.0.5':
|
||||
dependencies:
|
||||
'@types/estree': 1.0.5
|
||||
|
||||
Reference in New Issue
Block a user