diff --git a/projects/ngx-matomo-client/core/tracker/internal-matomo-tracker.service.spec.ts b/projects/ngx-matomo-client/core/tracker/internal-matomo-tracker.service.spec.ts index 9808b2a..5b74545 100644 --- a/projects/ngx-matomo-client/core/tracker/internal-matomo-tracker.service.spec.ts +++ b/projects/ngx-matomo-client/core/tracker/internal-matomo-tracker.service.spec.ts @@ -11,7 +11,7 @@ import { InternalMatomoTracker, } from './internal-matomo-tracker.service'; -declare var window: MatomoHolder; +declare const window: MatomoHolder; // Extracted from https://github.com/angular/angular/blob/b66e479cdb1e474a29ff676f10a5fcc3d7eae799/packages/common/src/platform_id.ts const PLATFORM_BROWSER_ID = 'browser'; @@ -28,6 +28,7 @@ describe('InternalMatomoTracker', () => { function createTracker( config: Partial = { disabled: false }, + // eslint-disable-next-line @typescript-eslint/ban-types platform: Object = PLATFORM_BROWSER_ID, ngZone: NgZone = createMockZone(), ): InternalMatomoTracker { diff --git a/projects/ngx-matomo-client/core/tracker/internal-matomo-tracker.service.ts b/projects/ngx-matomo-client/core/tracker/internal-matomo-tracker.service.ts index be108b4..0dbc653 100644 --- a/projects/ngx-matomo-client/core/tracker/internal-matomo-tracker.service.ts +++ b/projects/ngx-matomo-client/core/tracker/internal-matomo-tracker.service.ts @@ -4,7 +4,7 @@ import { initializeMatomoHolder, MatomoHolder } from '../holder'; import { Getters, NonEmptyArray, PrefixedType } from '../utils/types'; import { INTERNAL_MATOMO_CONFIGURATION } from './configuration'; -declare var window: MatomoHolder; +declare const window: MatomoHolder; type ReturnType = T extends (...args: any) => infer R ? R : any;