Installation
npm install --save @types/react-beforeunload
Summary
This package contains type definitions for react-beforeunload (https://github.com/jacobbuck/react-beforeunload#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-beforeunload.
index.d.ts
import * as React from "react";
export type UseBeforeunloadHandler = ((arg: Event) => string | undefined) | ((arg: Event) => void);
export function useBeforeunload(handler?: UseBeforeunloadHandler): void;
export const Beforeunload: React.FC<{
children?: React.ReactNode | undefined;
onBeforeunload: UseBeforeunloadHandler;
}>;
Additional Details
- Last updated: Sat, 30 Dec 2023 14:07:00 GMT
- Dependencies: @types/react
Credits
These definitions were written by nem035.