2.0.5 • Published 6 months ago

@types/parcel__watcher v2.0.5

Weekly downloads
205
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for @parcel/watcher 2.0
// Project: https://github.com/parcel-bundler/watcher#readme
// Definitions by: Matt Kane <https://github.com/ascorbic>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <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: Thu, 08 Jul 2021 20:19:16 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Matt Kane.

2.0.3

8 months ago

2.0.5

6 months ago

2.0.4

7 months ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago