# @types/service-worker-updater

> TypeScript definitions for service-worker-updater

Latest version **0.0.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/service-worker-updater
pnpm add @types/service-worker-updater
yarn add @types/service-worker-updater
bun add @types/service-worker-updater
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-11-07 |
| First published | 2021-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/service-worker-updater
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/service-worker-updater
- npm.io page: https://npm.io/package/@types/service-worker-updater

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 0.0.3 (latest) — 2023-11-07
- 0.0.0 (ts3.7) — 2021-09-08
- 0.0.2 — 2023-10-18
- 0.0.1 — 2023-09-25

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/service-worker-updater/index.d.ts)
````ts
// 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: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [mike castleman](https://github.com/mlc).

---
_Source: https://npm.io/package/@types/service-worker-updater · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
