UNPKG

@kovalenko/has-unsaved-data

Version:

Provides a router guard preventing route deactivation, if the component\`s method decorated with `@CheckUnsavedData()` returns `true`. Also it prevents the window to be unloaded.

3 lines (2 loc) 226 B
import { UnsavedDataConfig } from './unsaved-data-config.interface'; export declare const UnsavedDataChecker: <T extends Record<string, any>>(optionsHandler?: ((obj: T) => UnsavedDataConfig) | undefined) => MethodDecorator;