Skip to content

Commit 04ec125

Browse files
committed
fix: narrow Event to ErrorEvent
1 parent d340355 commit 04ec125

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@ export class Loader {
241241
url: string;
242242

243243
private CALLBACK = "__googleMapsCallback";
244-
private callbacks: ((e: Event) => void)[] = [];
244+
private callbacks: ((e: ErrorEvent) => void)[] = [];
245245
private done = false;
246246
private loading = false;
247-
private onerrorEvent: Event;
247+
private onerrorEvent: ErrorEvent;
248248
private static instance: Loader;
249249
private errors: ErrorEvent[] = [];
250250

@@ -391,7 +391,7 @@ export class Loader {
391391
/**
392392
* Load the Google Maps JavaScript API script with a callback.
393393
*/
394-
loadCallback(fn: (e: Event) => void): void {
394+
loadCallback(fn: (e: ErrorEvent) => void): void {
395395
this.callbacks.push(fn);
396396
this.execute();
397397
}

0 commit comments

Comments
 (0)