# @types/parcel__watcher

> TypeScript definitions for @parcel/watcher

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

## Install

```sh
npm install @types/parcel__watcher
pnpm add @types/parcel__watcher
yarn add @types/parcel__watcher
bun add @types/parcel__watcher
```

## 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.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.5 |
| Published | 2023-11-07 |
| First published | 2020-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 2.0.5 (latest) — 2023-11-07
- 2.0.2 (ts3.6) — 2021-07-08
- 2.0.1 (ts3.2) — 2020-09-26
- 2.0.0 (ts2.8) — 2020-04-27
- 2.0.4 — 2023-10-18
- 2.0.3 — 2023-09-24

## README

# Installation
> `npm install --save @types/parcel__watcher`

# Summary
This package contains type definitions for @parcel/watcher (https://github.com/parcel-bundler/watcher#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parcel__watcher.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parcel__watcher/index.d.ts)
````ts
/// <reference types="node"/>

export class ParcelWatcherSubscription {
    unsubscribe(): Promise<void>;
}

export type ParcelWatcherEventType = "create" | "update" | "delete";

export interface ParcelWatcherEvent {
    type: ParcelWatcherEventType;
    path: string;
}

export type ParcelWatcherBackend = "fs-events" | "watchman" | "inotify" | "windows" | "brute-force";

export interface ParcelWatcherOptions {
    ignore?: string[] | undefined;
    backend?: ParcelWatcherBackend | undefined;
}

export type ParcelWatcherCallback = (error?: Error, events?: ParcelWatcherEvent[]) => any;

export function getEventsSince(
    dirPath: string,
    snapshotPath: string,
    options?: ParcelWatcherOptions,
): Promise<ParcelWatcherEvent[]>;

export function subscribe(
    dirPath: string,
    callback: ParcelWatcherCallback,
    options?: ParcelWatcherOptions,
): Promise<ParcelWatcherSubscription>;

export function unsubscribe(
    dirPath: string,
    callback: ParcelWatcherCallback,
    options?: ParcelWatcherOptions,
): Promise<void>;

export function writeSnapshot(dirPath: string, snapshotPath: string, options?: ParcelWatcherOptions): Promise<void>;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Matt Kane](https://github.com/ascorbic).

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