Skip to content

Commit 6cf9b86

Browse files
committed
Fix wrong param return type definition; Other minor optimization
1 parent 65e5feb commit 6cf9b86

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Popup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class Popup {
5454
}
5555

5656
private attachEventListeners: () => void = () => {
57-
return (event: MessageEvent) => {
57+
return (event: MessageEvent): void => {
5858
switch (event.data) {
5959
case Popup.EVENT_NAME_CANCELLED:
6060
this.call(Popup.EVENT_METHOD_CANCELLED);
@@ -69,7 +69,7 @@ export class Popup {
6969
} else if (event.data.aborted) {
7070
this.call(Popup.EVENT_METHOD_ABORTED);
7171
}
72-
return;
72+
break;
7373
}
7474
};
7575
};

src/Utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function httpCall<JsonResponse>(url: string, init?: RequestInit): P
4040
});
4141
}
4242

43-
export function addWindowEventListener(eventType: string, callback: () => void): () => void {
43+
export function addWindowEventListener(eventType: string, callback: any): () => void {
4444
window.addEventListener(eventType, callback);
4545
return () => {
4646
window.removeEventListener(eventType, callback);

0 commit comments

Comments
 (0)