• Version 1.0.6
  • Published
  • 6.29 kB
  • 1 dependency
  • MIT license


npm i @types/watch
yarn add @types/watch
pnpm add @types/watch


TypeScript definitions for watch



function createMonitor

createMonitor: {
(root: string, callback: (monitor: Monitor) => void): void;
(root: string, options: Options, callback: (monitor: Monitor) => void): void;

    function unwatchTree

    unwatchTree: (root: string) => void;

      function walk

      walk: {
      root: string,
      callback: (error: Error | null, files: Files | undefined) => void
      ): void;
      root: string,
      options: WalkOptions,
      callback: (error: Error, files: Files) => void
      ): void;

        function watchTree

        watchTree: {
        root: string,
        callback: (f: string, curr: fs.Stats, prev: fs.Stats) => void
        ): void;
        root: string,
        options: Options,
        callback: (f: string, curr: fs.Stats, prev: fs.Stats) => void
        ): void;


          interface BaseOptions

          interface BaseOptions {}

            property ignoreDotFiles

            ignoreDotFiles?: boolean | undefined;

              method filter

              filter: (path: string, stat: fs.Stats) => boolean;

                interface Files

                interface Files {}

                  index signature

                  [key: string]: fs.Stats;

                    interface Monitor

                    interface Monitor extends events.EventEmitter {}

                      property files

                      files: Files;

                        method on

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

                          method stop

                          stop: () => void;

                            interface Options

                            interface Options extends BaseOptions {}

                              property interval

                              interval?: number | undefined;

                                interface WalkOptions

                                interface WalkOptions extends BaseOptions {}

                                  property ignoreDirectoryPattern

                                  ignoreDirectoryPattern?: RegExp | undefined;

                                    property ignoreNotPermitted

                                    ignoreNotPermitted?: boolean | undefined;

                                      property ignoreUnreadableDir

                                      ignoreUnreadableDir?: boolean | undefined;

                                        Package Files (1)

                                        Dependencies (1)

                                        Dev Dependencies (0)

                                        No dev dependencies.

                                        Peer Dependencies (0)

                                        No peer dependencies.


                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/watch.

                                        • Markdown
                                        • HTML
                                          <a href="https://www.jsdocs.io/package/@types/watch"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>