2.4.5 • Published 5 months ago
@types/react-detect-offline v2.4.5
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
// Type definitions for react-detect-offline 2.4
// Project: https://github.com/cwise89/react-detect-offline#readme
// Definitions by: Rhythm Bhiwani <https://github.com/rhythmbhiwani>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="react" />
export interface PollingConfig {
url: string;
enabled: boolean;
interval: number;
timeout: number;
}
export interface BaseProps {
children?: React.ReactNode;
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: Thu, 14 Oct 2021 10:01:29 GMT
- Dependencies: @types/react
- Global values: none
Credits
These definitions were written by Rhythm Bhiwani.