Skip to content

Commit 835201a

Browse files
rmi22186claude
andcommitted
fix: Make filteredUserAttributes optional on RoktKit.init
`KitInterface.init` declares `userAttributes?: AllUserAttributes`, so callers may omit it. The override required the param, which violated substitutability once the kit consumed the SDK's authoritative `KitInterface` types instead of the looser DT shape. Adding `?` is enough — `Record<string, unknown>` is already a supertype of `AllUserAttributes` on the value side. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b92e611 commit 835201a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Rokt-Kit.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import { Batch, KitInterface, IMParticleUser, SDKEvent } from '@mparticle/web-sdk/internal';
2020
import type { IUserIdentities } from '@mparticle/web-sdk';
21+
2122
// BaseEvent not re-exported from @mparticle/web-sdk/internal, so we import directly from @mparticle/event-models.
2223
import { BaseEvent } from '@mparticle/event-models';
2324

@@ -1071,7 +1072,7 @@ class RoktKit implements KitInterface {
10711072
_service: unknown,
10721073
testMode: boolean,
10731074
_trackerId: unknown,
1074-
filteredUserAttributes: Record<string, unknown>,
1075+
filteredUserAttributes?: Record<string, unknown>,
10751076
): string {
10761077
const kitSettings = settings as unknown as RoktKitSettings;
10771078
const accountId = kitSettings.accountId;

0 commit comments

Comments
 (0)