Skip to content

Commit

Permalink
chore: update input types
Browse files Browse the repository at this point in the history
  • Loading branch information
Samaritan1011001 committed Oct 9, 2023
1 parent aa94cf1 commit 026af99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function dispatchEvent(input: DisptachEventInput): Promise<void> {
const cachedMessages = await defaultStorage.getItem(key);
const messages: InAppMessage[] = await processInAppMessages(
cachedMessages ? JSON.parse(cachedMessages) : [],
input.event
input
);
const flattenedMessages = flatten(messages);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { InAppMessageConflictHandler, SetConflictHandlerInput } from '../types';
* ```
*/
export function setConflictHandler(input: SetConflictHandlerInput): void {
conflictHandler = input.handler;
conflictHandler = input;
}

export let conflictHandler: InAppMessageConflictHandler =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export type IdentifyUserInput =
/**
* Input type for Pinpoint dispatchEvent API.
*/
export type DisptachEventInput = { event: InAppMessagingEvent };
export type DisptachEventInput = InAppMessagingEvent;

/**
* Input type for Pinpoint SetConflictHandler API.
*/
export type SetConflictHandlerInput = { handler: InAppMessageConflictHandler };
export type SetConflictHandlerInput = InAppMessageConflictHandler;

0 comments on commit 026af99

Please sign in to comment.