Skip to content

Commit 82bd6e3

Browse files
fix(ping-protect): fixes type for PIProtect.start() options object
1 parent 39c74ed commit 82bd6e3

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changeset/brave-moose-run.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@forgerock/ping-protect': patch
3+
---
4+
5+
fixes the type of the options param in `PIProtect.start` so it better aligns with output from `PingOneProtectInitializeCallback.getConfig()` as defined in `javascript-sdk` (importantly it no longer expects `_type` and `_action` fields)

packages/ping-protect/src/lib/ping-protect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export type InitParams = Omit<ProtectInitializeConfig, '_type' | '_action'>;
2727
declare global {
2828
interface Window {
2929
_pingOneSignals: {
30-
init: (initParams?: ProtectInitializeConfig) => Promise<void>;
30+
init: (initParams?: InitParams) => Promise<void>;
3131
getData: () => Promise<string>;
3232
pauseBehavioralData: () => void;
3333
resumeBehavioralData: () => void;
@@ -56,7 +56,7 @@ export abstract class PIProtect {
5656
* @param {InitParams} options - The init parameters
5757
* @returns {Promise<void>} - Returns a promise
5858
*/
59-
public static async start(options: ProtectInitializeConfig): Promise<void> {
59+
public static async start(options: InitParams): Promise<void> {
6060
try {
6161
/*
6262
* Load the Ping Signals SDK

0 commit comments

Comments
 (0)