Skip to content

Commit e130394

Browse files
Address PR Comments
1 parent 6fddac5 commit e130394

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

src/mp-instance.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,10 @@ export default function mParticleInstance(this: IMParticleWebSDKInstance, instan
126126
this._IntegrationCapture = new IntegrationCapture();
127127

128128
// required for forwarders once they reference the mparticle instance
129-
this.IdentityType = IdentityType as unknown as valueof<typeof IdentityType>;
130-
// this.EventType = EventType as unknown as valueof<typeof EventType>;
129+
this.IdentityType = IdentityType;
131130
this.EventType = EventType;
132-
this.CommerceEventType = CommerceEventType as unknown as valueof<typeof CommerceEventType>;
133-
this.PromotionType = PromotionActionType as unknown as valueof<typeof PromotionActionType>;
131+
this.CommerceEventType = CommerceEventType;
132+
this.PromotionType = PromotionActionType;
134133
this.ProductActionType = ProductActionType;
135134

136135

src/mparticle-instance-manager.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ function mParticleInstanceManager(this: IMParticleInstanceManager) {
3232
// Only leaving this here in case any clients are trying to access mParticle.Store, to prevent from throwing
3333
this.Store = {} as IStore;
3434
this._instances = {} as Dictionary<IMParticleWebSDKInstance>;
35-
this.IdentityType = IdentityType as unknown as valueof<typeof IdentityType>;
36-
// this.EventType = EventType as unknown as valueof<typeof EventType>;
35+
this.IdentityType = IdentityType;
3736
this.EventType = EventType;
38-
this.CommerceEventType = CommerceEventType as unknown as valueof<typeof CommerceEventType>;
39-
this.PromotionType = PromotionActionType as unknown as valueof<typeof PromotionActionType>;
37+
this.CommerceEventType = CommerceEventType;
38+
this.PromotionType = PromotionActionType;
4039
this.ProductActionType = ProductActionType;
4140

4241
this.MPSideloadedKit = MPSideloadedKit;

src/sdkRuntimeModels.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,10 @@ export interface SDKProduct {
162162
// https://go.mparticle.com/work/SQDSDKS-6949
163163
export interface MParticleWebSDK {
164164
addForwarder(mockForwarder: MPForwarder): void;
165-
// FIXME: Make these consistent
166-
IdentityType: valueof<typeof IdentityType>;
167-
CommerceEventType: valueof<typeof CommerceEventType>;
165+
IdentityType: typeof IdentityType;
166+
CommerceEventType: typeof CommerceEventType;
168167
EventType: typeof EventType;
169-
PromotionType: valueof<typeof PromotionActionType>;
168+
PromotionType: typeof PromotionActionType;
170169
ProductActionType: typeof ProductActionType;
171170
Identity: SDKIdentityApi;
172171
Logger: SDKLoggerApi;

test/src/tests-forwarders.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import { IMParticleInstanceManager, SDKEvent } from '../../src/sdkRuntimeModels'
1414
import { IMParticleUser, UserAttributes } from '../../src/identity-user-interfaces';
1515
import { IdentityType } from '../../src/types';
1616
import { IntegrationAttribute } from '../../src/store';
17-
import { IConsentRules } from '../../src/consent';
18-
import { UserIdentities } from '@mparticle/web-sdk';
1917

2018

2119
const {

0 commit comments

Comments
 (0)