2.1.5 • Published 11 months ago

@types/react-beforeunload v2.1.5

Weekly downloads
6,598
License
MIT
Repository
github
Last release
11 months ago

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

// Type definitions for react-beforeunload 2.1
// Project: https://github.com/jacobbuck/react-beforeunload#readme
// Definitions by: nem035 <https://github.com/nem035>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

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: Thu, 08 Jul 2021 20:20:26 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by nem035.