mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [history] update to v4.5 - move legacy history to v2 folder - fix dependent packages' package.json file to use legacy history v2 * [history] change dependents to support old history * [history] fix updated dependents
16 lines
690 B
TypeScript
16 lines
690 B
TypeScript
import { Location, Action, LocationListener, UnregisterCallback } from './index';
|
|
import { getConfirmation } from './DOMUtils';
|
|
|
|
export type PromptFunction = (location: Location, action: Action) => any;
|
|
|
|
export type Prompt = PromptFunction | boolean;
|
|
|
|
export interface TransitionManager {
|
|
setPrompt(nextPrompt?: Prompt): UnregisterCallback;
|
|
appendListener(listener: LocationListener): UnregisterCallback;
|
|
notifyListeners(location: Location, action: Action): void;
|
|
confirmTransitionTo(location: Location, action: Action, getUserConfirmation: typeof getConfirmation, callback: (result: boolean) => void): void;
|
|
}
|
|
|
|
export default function createTransitionManager(): TransitionManager;
|