$ cnpm install @types/parcel__watcher
npm install --save @types/parcel__watcher
This package contains type definitions for @parcel/watcher (https://github.com/parcel-bundler/watcher#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parcel__watcher.
/// <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>;
These definitions were written by Matt Kane.
Copyright 2013 - present © cnpmjs.org | Home |