We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2fa98c commit fa6f8e2Copy full SHA for fa6f8e2
src/helpers/eventGateway.ts
@@ -1,13 +1,16 @@
1
+import type { EventsKey } from "ol/events";
2
import type { defineEmits } from "vue";
3
4
export default function eventGateway(
5
emit: ReturnType<typeof defineEmits>,
- instance: { on: (event: any, ...args: any[]) => unknown },
6
+ instance: {
7
+ on: (event: string, ...args: unknown[]) => EventsKey;
8
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
+ } & any,
10
events: string[]
11
) {
- [...COMMON_EVENTS, ...events].forEach((event: string) => {
12
+ [...COMMON_EVENTS, ...events].forEach((event) => {
13
instance.on(event, (...args: unknown[]) => {
- console.log(event, args);
14
emit(event, ...args);
15
});
16
0 commit comments