
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@types/react-detect-offline
Advanced tools
TypeScript definitions for react-detect-offline
npm install --save @types/react-detect-offline
This package contains type definitions for react-detect-offline (https://github.com/cwise89/react-detect-offline#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-detect-offline.
import { JSX } from "react";
export interface PollingConfig {
/**
* URL to pool for connection status
*/
url: string;
/**
* Force polling on or off.
* Polling is only used as a fallback for browsers that don't support the `"online"` event.
* Currently these are Chrome on Windows, Firefox on Windows, and Chrome on Linux.
*/
enabled: boolean;
/**
* How often (in ms) to poll
*/
interval: number;
/**
* How long (in ms) before timeout
*/
timeout: number;
}
export interface BaseProps {
children?: React.ReactNode | undefined;
/**
* Called when connection changes
*/
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
onChange?: ((online: boolean) => void | undefined) | undefined;
wrapperType?: string | undefined;
/**
* Config for polling fallback
*/
polling?: boolean | Partial<Omit<PollingConfig, "enabled">> | undefined;
}
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;
}
export interface DetectorState extends BaseState {}
export const Detector: React.ComponentClass<DetectorProps, DetectorState>;
export interface OnlineProps extends BaseProps {}
export interface OnlineState extends BaseState {}
export const Online: React.ComponentClass<OnlineProps, OnlineState>;
export interface OfflineProps extends BaseProps {}
export interface OfflineState extends BaseState {}
export const Offline: React.ComponentClass<OfflineProps, OfflineState>;
These definitions were written by Rhythm Bhiwani.
FAQs
TypeScript definitions for react-detect-offline
We found that @types/react-detect-offline demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.