@types/react-detect-offline
TypeScript icon, indicating that this package has built-in type declarations

2.4.5 • Public • Published

Installation

npm install --save @types/react-detect-offline

Summary

This package contains type definitions for react-detect-offline (https://github.com/cwise89/react-detect-offline#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-detect-offline.

index.d.ts

import { JSX } from "react";

export interface PollingConfig {
    url: string;
    enabled: boolean;
    interval: number;
    timeout: number;
}
export interface BaseProps {
    children?: React.ReactNode;
    // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
    onChange?: (online: boolean) => void | undefined;
    wrapperType?: string;
    polling?: boolean | PollingConfig;
}
export interface BaseState {
    online: boolean;
}
export const defaultProps: BaseProps;
export const defaultPollingConfig: PollingConfig;
export const Base: React.ComponentClass<BaseProps, BaseState>;
export interface DetectorProps extends BaseProps {
    render: ({ online }: { online: boolean }) => JSX.Element | null;
}
// tslint:disable-next-line
export interface DetectorState extends BaseState {}
export const Detector: React.ComponentClass<DetectorProps, DetectorState>;
// tslint:disable-next-line
export interface OnlineProps extends BaseProps {}
// tslint:disable-next-line
export interface OnlineState extends BaseState {}
export const Online: React.ComponentClass<OnlineProps, OnlineState>;
// tslint:disable-next-line
export interface OfflineProps extends BaseProps {}
// tslint:disable-next-line
export interface OfflineState extends BaseState {}
export const Offline: React.ComponentClass<OfflineProps, OfflineState>;

Additional Details

  • Last updated: Wed, 06 Dec 2023 06:36:35 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Rhythm Bhiwani.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-detect-offline

Weekly Downloads

4,272

Version

2.4.5

License

MIT

Unpacked Size

5.41 kB

Total Files

5

Last publish

Collaborators

  • types