(event: Events, payload?: unknown)
| 3 | |
| 4 | class BaseEventHandle { |
| 5 | protected emit(event: Events, payload?: unknown) { |
| 6 | const isDev = config.envs.environment === 'development'; |
| 7 | |
| 8 | isDev && console.info(`events[emit]: ${event}`, payload); |
| 9 | |
| 10 | const customEvent = new CustomEvent(event, { detail: payload }); |
| 11 | document.dispatchEvent(customEvent); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | export { BaseEventHandle }; |
no outgoing calls
no test coverage detected