UNPKG

@virtualstate/navigation

Version:

Native JavaScript [navigation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API) implementation

10 lines (9 loc) 491 B
import { Event } from "./event"; import { EventDescriptor } from "./descriptor"; export interface SyncEventCallback<TargetEvent = unknown> { (event: TargetEvent): void; } export interface EventCallback<TargetEvent extends Event = Event> { <E extends TargetEvent>(event: E): Promise<unknown | void> | unknown | void; } export declare function matchEventCallback(type: string | symbol, callback?: EventCallback | Function, options?: unknown): (descriptor: EventDescriptor) => boolean;