Socket
Socket
Sign inDemoInstall

@types/react-detect-offline

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-detect-offline

TypeScript definitions for react-detect-offline


Version published
Weekly downloads
4.8K
decreased by-6.91%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 06 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc