Skip to content

Commit 65e5feb

Browse files
committed
Set missing param types
1 parent 4a08efb commit 65e5feb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export type LogInfo = {
33
message: string;
44
};
55

6-
export function logMessage(type: string, info: LogInfo) {
6+
export function logMessage(type: string, info: LogInfo): void {
77
switch (type) {
88
case 'warning':
99
console.warn(info.message);

src/Utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ export async function httpCall<JsonResponse>(url: string, init?: RequestInit): P
3232
}
3333
throw new Error(response.statusText);
3434
})
35-
.then((response) => {
35+
.then((response: JsonResponse) => {
3636
return response;
3737
})
38-
.catch((error) => {
38+
.catch((error: string) => {
3939
throw new Error(error);
4040
});
4141
}
4242

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

0 commit comments

Comments
 (0)