mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-22 20:37:58 +08:00
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
// Type definitions for chokidar 1.4.3
|
|
// Project: https://github.com/paulmillr/chokidar
|
|
// Definitions by: Stefan Steinhart <https://github.com/reppners/>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/// <reference types="node" />
|
|
|
|
declare module "fs"
|
|
{
|
|
interface FSWatcher
|
|
{
|
|
add(fileDirOrGlob:string):void;
|
|
add(filesDirsOrGlobs:Array<string>):void;
|
|
unwatch(fileDirOrGlob:string):void;
|
|
unwatch(filesDirsOrGlobs:Array<string>):void;
|
|
getWatched():any;
|
|
}
|
|
}
|
|
|
|
declare module "chokidar"
|
|
{
|
|
interface WatchOptions
|
|
{
|
|
persistent?:boolean;
|
|
ignored?:any;
|
|
ignoreInitial?:boolean;
|
|
followSymlinks?:boolean;
|
|
cwd?:string;
|
|
usePolling?:boolean;
|
|
useFsEvents?:boolean;
|
|
alwaysStat?:boolean;
|
|
depth?:number;
|
|
interval?:number;
|
|
binaryInterval?:number;
|
|
ignorePermissionErrors?:boolean;
|
|
atomic?:boolean;
|
|
awaitWriteFinish?:any;
|
|
}
|
|
|
|
import fs = require("fs");
|
|
|
|
function watch(fileDirOrGlob:string, options?:WatchOptions):fs.FSWatcher;
|
|
function watch(filesDirsOrGlobs:Array<string>, options?:WatchOptions):fs.FSWatcher;
|
|
}
|