Skip to content

Commit beef193

Browse files
jaissica12Jaissica Hora
andauthored
🤖 Merge PR DefinitelyTyped#73647 Add tests and definition for use method by @jaissica12
Co-authored-by: Jaissica Hora <[email protected]>
1 parent 3a1fb08 commit beef193

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

types/mparticle__web-sdk/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ interface SelectPlacements {
362362
(options: RoktSelectPlacementsOptions): Promise<RoktSelection>;
363363
}
364364

365+
interface Use {
366+
(name: string): Promise<unknown>;
367+
}
368+
365369
interface HashAttributes {
366370
(attributes: RoktPartnerAttributes): Promise<Record<string, string>>;
367371
}
@@ -556,6 +560,7 @@ export namespace Rokt {
556560
const selectPlacements: SelectPlacements;
557561
const hashAttributes: HashAttributes;
558562
const setExtensionData: SetExtensionData;
563+
const use: Use;
559564
}
560565

561566
export interface IdentifyRequest {
@@ -817,6 +822,7 @@ declare class mParticleInstance {
817822
selectPlacements: SelectPlacements;
818823
hashAttributes: HashAttributes;
819824
setExtensionData: SetExtensionData;
825+
use: Use;
820826
};
821827
PromotionType: {
822828
Unknown: PromotionType.Unknown;

types/mparticle__web-sdk/test/mparticle__web-sdk-tests.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ mParticle.Rokt.setExtensionData({
226226
},
227227
});
228228

229+
mParticle.Rokt.use("test-extension-name");
230+
229231
mParticle.ready(() => {
230232
console.log("hi");
231233
});

0 commit comments

Comments
 (0)