@types/watch
TypeScript definitions for watch
Last updated 7 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/watch 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/watch

Summary

This package contains type definitions for watch (https://github.com/mikeal/watch).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/watch.

index.d.ts

// Type definitions for watch 1.0
// Project: https://github.com/mikeal/watch
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>, Gyusun Yeom <https://github.com/Perlmint>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

// Imported from: https://github.com/soywiz/typescript-node-definitions/watch.d.ts

/// <reference types="node" />

import fs = require("fs");
import events = require("events");

export type FileOrFiles = fs.Stats | {[key: string]: fs.Stats};

export interface Monitor extends events.EventEmitter {
    files: {[key: string]: fs.Stats};

    on(event: "created" | "removed", listener: (f: FileOrFiles, stat: fs.Stats) => void): this;
    on(event: "changed", listener: (f: FileOrFiles, current: fs.Stats, prev: fs.Stats) => void): this;
    on(event: string | symbol, listener: (...args: any[]) => void): this;
    stop(): void;
}

export interface Options {
    ignoreDotFiles?: boolean | undefined;
    filter?(path: string, stat: fs.Stats): boolean;
    interval?: number | undefined;
    ignoreUnreadableDir?: boolean | undefined;
    ignoreNotPermitted?: boolean | undefined;
    ignoreDirectoryPattern?: RegExp | undefined;
}

export function watchTree(root: string, callback: (f: FileOrFiles, curr: fs.Stats, prev: fs.Stats) => void): void;
export function watchTree(root: string, options: Options, callback: (f: FileOrFiles, curr: fs.Stats, prev: fs.Stats) => void): void;
export function unwatchTree(root: string): void;
export function createMonitor(root: string, callback: (monitor: Monitor) => void): void;
export function createMonitor(root: string, options: Options, callback: (monitor: Monitor) => void): void;

Additional Details

  • Last updated: Fri, 02 Jul 2021 18:05:15 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Carlos Ballesteros Velasco, and Gyusun Yeom.

Current Tags

  • 1.0.3                                ...           latest (4 years ago)
  • 1.0.1                                ...           ts2.0 (7 years ago)
  • 1.0.1                                ...           ts2.1 (7 years ago)
  • 1.0.1                                ...           ts2.2 (7 years ago)
  • 1.0.1                                ...           ts2.3 (7 years ago)
  • 1.0.1                                ...           ts2.4 (7 years ago)
  • 1.0.1                                ...           ts2.5 (7 years ago)
  • 1.0.1                                ...           ts2.6 (7 years ago)
  • 1.0.1                                ...           ts2.7 (7 years ago)
  • 1.0.1                                ...           ts2.8 (7 years ago)
  • 1.0.1                                ...           ts2.9 (7 years ago)
  • 1.0.1                                ...           ts3.0 (7 years ago)
  • 1.0.1                                ...           ts3.1 (7 years ago)
  • 1.0.1                                ...           ts3.2 (7 years ago)
  • 1.0.1                                ...           ts3.3 (7 years ago)
  • 1.0.1                                ...           ts3.4 (7 years ago)
  • 1.0.1                                ...           ts3.5 (7 years ago)
  • 1.0.2                                ...           ts3.6 (5 years ago)
  • 1.0.2                                ...           ts3.7 (5 years ago)
  • 1.0.3                                ...           ts3.8 (4 years ago)
  • 1.0.3                                ...           ts3.9 (4 years ago)
  • 1.0.3                                ...           ts4.0 (4 years ago)
  • 1.0.3                                ...           ts4.1 (4 years ago)
  • 1.0.3                                ...           ts4.2 (4 years ago)
  • 1.0.3                                ...           ts4.3 (4 years ago)
  • 1.0.3                                ...           ts4.4 (4 years ago)
  • 1.0.3                                ...           ts4.5 (4 years ago)
  • 1.0.3                                ...           ts4.6 (4 years ago)
  • 1.0.3                                ...           ts4.7 (4 years ago)
  • 1.0.3                                ...           ts4.8 (4 years ago)
  • 1.0.3                                ...           ts4.9 (4 years ago)
  • 1.0.3                                ...           ts5.0 (4 years ago)
  • 1.0.3                                ...           ts5.1 (4 years ago)

15 Versions

  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.28                                ...           10 years ago
  • 0.0.27                                ...           10 years ago
  • 0.0.26-alpha                                ...           10 years ago
  • 0.0.25-alpha                                ...           10 years ago
  • 0.0.24-alpha                                ...           10 years ago
  • 0.0.23-alpha                                ...           10 years ago
  • 0.0.22-alpha                                ...           10 years ago
  • 0.0.21-alpha                                ...           10 years ago
  • 0.0.20-alpha                                ...           10 years ago
  • 0.0.15-alpha                                ...           10 years ago
  • 0.0.14-alpha                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |