Export `on` method callback function type

This commit is contained in:
Andreas Nedbal 2022-01-03 03:30:14 +01:00 committed by Andreas Nedbal
parent 683657a281
commit b2d430eb1e
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
type OnCallbackFunction = (event: Event) => void; export type OnCallbackFunction = (event: Event) => void;
export function on(type: string, selector: string, callback: OnCallbackFunction): void { export function on(type: string, selector: string, callback: OnCallbackFunction): void {
document.addEventListener(type, (event: Event) => { document.addEventListener(type, (event: Event) => {