0.0.3 • Published 7 months ago
@types/service-worker-updater v0.0.3
Installation
npm install --save @types/service-worker-updater
Summary
This package contains type definitions for service-worker-updater (https://github.com/cactoo/service-worker-updater#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/service-worker-updater.
index.d.ts
// Type definitions for service-worker-updater 0.0
// Project: https://github.com/cactoo/service-worker-updater#readme
// Definitions by: mike castleman <https://github.com/mlc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 4.0
import * as React from 'react';
export type UpdateHandler = () => void;
export interface CheckOptions {
checkInterval?: number;
updateOnLoad?: boolean;
}
export type UpdateHookResult = [hasUpdate: boolean, updateHandler: UpdateHandler];
export function useSWUpdateChecker(opts?: CheckOptions): UpdateHookResult;
export interface InjectedUpdateProps {
hasUpdate: boolean;
updateHandler: UpdateHandler;
}
export function withSWUpdateChecker<P extends InjectedUpdateProps>(
WrappedComponent: React.ComponentType<P>,
opts?: CheckOptions,
): React.ComponentClass<Omit<P, keyof InjectedUpdateProps>>;
Additional Details
- Last updated: Wed, 08 Sep 2021 21:31:20 GMT
- Dependencies: @types/react
- Global values: none
Credits
These definitions were written by mike castleman.