npm.io
2.1.5 • Published 2 years ago

@types/react-beforeunload

Licence
MIT
Version
2.1.5
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
51.5K

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 1400 GMT
  • Dependencies: @types/react

Credits

These definitions were written by nem035.