UNPKG

@virtualstate/navigation

Version:

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

11 lines (10 loc) 420 B
import { Event } from "./event"; export interface InterceptEvent<Name extends string | symbol = string, T = unknown> extends Event<Name> { /** * @param value * @throws InvalidStateError */ intercept(value: T | Promise<T>): void; transitionWhile?(value: T | Promise<T>): void; } export declare function isInterceptEvent<T = unknown>(value: object): value is InterceptEvent<string | symbol, T>;