Export `on` method callback function type
This commit is contained in:
parent
683657a281
commit
b2d430eb1e
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in New Issue