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

Installation

npm install --save @types/gaze

Summary

This package contains type definitions for gaze (https://github.com/shama/gaze).

Details

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

index.d.ts

// Type definitions for gaze 1.1
// Project: https://github.com/shama/gaze
// Definitions by:  Adam Zerella <https://github.com/adamzerella>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.1

type Mode = 'auto' | 'watch' | 'poll';

interface Options {
    /**
     * Interval to pass to fs.watchFile.
     */
    interval?: number | undefined;
    /**
     * Delay for events called in succession for the same file/event in milliseconds.
     */
    debounceDelay?: number | undefined;
    /**
     * Force the watch mode. Either 'auto' (default),
     * 'watch' (force native events), or 'poll' (force stat polling).
     */
    mode?: Mode | undefined;
    /**
     * The current working directory to base file patterns from. Default is `process.cwd()`.
     */
    cwd?: string | undefined;
}

declare namespace gaze {
    class Gaze {
        constructor(
            patterns: string | string[],
            options?: Options | null,
            callback?: (error: Error | null, watcher: Gaze) => void
        );

        /**
         * Wrapper for EventEmitter.emit. `added`|`changed`|`renamed`|`deleted` events will also trigger the `all` event.
         */
        emit(event: string, ...args: any): boolean;

        /**
         * Unwatch all files and reset the watch instance.
         */
        close(): void;

        /**
         * Adds file(s) patterns to be watched.
         */
        add(patterns: string | string[]): void;

        /**
         * Removes a file or directory from being watched. Does not recurse directories.
         */
        remove(filepath: string): void;

        /**
         * Returns the currently watched files.
         */
        watched(): string[];

        /**
         * Returns the currently watched files with relative paths.
         */
        relative(dir: string, unixify: boolean): string[];
    }
}

declare function gaze(
    patterns: string | string[],
    options?: Options | null,
    callback?: (error: Error | null, watcher: gaze.Gaze) => void
): void;

export = gaze;

Additional Details

  • Last updated: Tue, 06 Jul 2021 20:33:03 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Adam Zerella.

Current Tags

  • 1.1.2                                ...           latest (4 years ago)
  • 1.1.0                                ...           ts3.1 (6 years ago)
  • 1.1.0                                ...           ts3.2 (6 years ago)
  • 1.1.0                                ...           ts3.3 (6 years ago)
  • 1.1.0                                ...           ts3.4 (6 years ago)
  • 1.1.0                                ...           ts3.5 (6 years ago)
  • 1.1.1                                ...           ts3.6 (5 years ago)
  • 1.1.1                                ...           ts3.7 (5 years ago)
  • 1.1.2                                ...           ts3.8 (4 years ago)
  • 1.1.2                                ...           ts3.9 (4 years ago)
  • 1.1.2                                ...           ts4.0 (4 years ago)
  • 1.1.2                                ...           ts4.1 (4 years ago)
  • 1.1.2                                ...           ts4.2 (4 years ago)
  • 1.1.2                                ...           ts4.3 (4 years ago)
  • 1.1.2                                ...           ts4.4 (4 years ago)
  • 1.1.2                                ...           ts4.5 (4 years ago)
  • 1.1.2                                ...           ts4.6 (4 years ago)
  • 1.1.2                                ...           ts4.7 (4 years ago)
  • 1.1.2                                ...           ts4.8 (4 years ago)
  • 1.1.2                                ...           ts4.9 (4 years ago)

3 Versions

  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |