Skip to content

Commit

Permalink
Fix ConnectorSDKOnEventLoadCallback types
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairaziz committed Oct 30, 2023
1 parent a66f1bd commit 3cf234f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ECMAScript/core/src/api/browser.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
interface CallbackManager {
onEvent(callback: ConnectorSDKOnEventCallback): void
onLoad(callback: ConnectorSDKOnEventCallback): void
onLoad(callback: ConnectorSDKOnEventLoadCallback): void
onExit(callback: ConnectorSDKOnEventExitCallback): void
onExitSuccess(callback: ConnectorSDKOnExitSuccessCallback): void
onExitAbort(callback: ConnectorSDKOnExitAbortCallback): void
onExitError(callback: ConnectorSDKOnExitErrorCallback): void

// Because it's well within React behavior to try to register a billion functions
offEvent(callback: ConnectorSDKOnEventCallback): void
offLoad(callback: ConnectorSDKOnEventCallback): void
offLoad(callback: ConnectorSDKOnEventLoadCallback): void
offExit(callback: ConnectorSDKOnEventExitCallback): void
offExitSuccess(callback: ConnectorSDKOnExitSuccessCallback): void
offExitAbort(callback: ConnectorSDKOnExitAbortCallback): void
Expand All @@ -29,7 +29,7 @@ export interface ConnectorSDKConnector extends CallbackManager {

export type ConnectorSDKCallbacks = {
onEvent?: ConnectorSDKOnEventCallback
onLoad?: ConnectorSDKOnEventCallback
onLoad?: ConnectorSDKOnEventLoadCallback
onExit?: ConnectorSDKOnEventExitCallback
onExitSuccess?: ConnectorSDKOnExitSuccessCallback
onExitAbort?: ConnectorSDKOnExitAbortCallback
Expand All @@ -42,7 +42,7 @@ export type ConnectorSDKOnEventCallback = (
) => void

export type ConnectorSDKOnEventLoadCallback = (
type: ConnectorSDKEventType,
type: ConnectorSDKEventType.Load,
metadata: ConnectorSDKCallbackMetadata
) => void

Expand Down

0 comments on commit 3cf234f

Please sign in to comment.