@file-services/types
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -8,23 +8,30 @@ import { IFileSystemStats } from './base-api'; | ||
/** | ||
* Start watching a path (file or directory). | ||
* Start watching `path` (file or directory). | ||
* if `listener` is provided, it will receive watch events for `path`. | ||
* Any global listeners will also receive events for path. | ||
*/ | ||
watchPath(path: string): Promise<void>; | ||
watchPath(path: string, listener?: WatchEventListener): Promise<void>; | ||
/** | ||
* Stop watching `path` (file or directory). | ||
* if `listener` is provided, it will stop receiving watch events for `path`. | ||
* if `listener is not provided, path will be unwatched with its listeners cleared. | ||
*/ | ||
unwatchPath(path: string, listener?: WatchEventListener): Promise<void>; | ||
/** | ||
* Unwatch all watched paths. | ||
*/ | ||
unwatchAll(): Promise<void>; | ||
unwatchAllPaths(): Promise<void>; | ||
/** | ||
* Add a listener function. | ||
* It will start receiving watch events for all watched paths. | ||
* Add a global watch event listener. | ||
* It will receive watch events for all watched paths. | ||
*/ | ||
addListener(listener: WatchEventListener): void; | ||
addGlobalListener(listener: WatchEventListener): void; | ||
/** | ||
* Remove a listener function. | ||
* It will stop receiving watch events. | ||
* Remove a global watch event listener. | ||
*/ | ||
removeListener(listener: WatchEventListener): void; | ||
removeGlobalListener(listener: WatchEventListener): void; | ||
/** | ||
* Remove all existing listeners. | ||
* Clears all registered global watch event listeners. | ||
*/ | ||
removeAllListeners(): void; | ||
clearGlobalListeners(): void; | ||
} | ||
@@ -31,0 +38,0 @@ /** |
{ | ||
"name": "@file-services/types", | ||
"description": "Common file system interfaces", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"main": "cjs/index.js", | ||
@@ -24,3 +24,3 @@ "types": "cjs/index.d.ts", | ||
"sideEffects": false, | ||
"gitHead": "6203b5b30191f38c522498dfb1a3a31ef42c5cba" | ||
"gitHead": "88403a745651cbbaf45b492b0b37d7f044cf3ea0" | ||
} |
@@ -9,27 +9,35 @@ import { IFileSystemStats } from './base-api' | ||
/** | ||
* Start watching a path (file or directory). | ||
* Start watching `path` (file or directory). | ||
* if `listener` is provided, it will receive watch events for `path`. | ||
* Any global listeners will also receive events for path. | ||
*/ | ||
watchPath(path: string): Promise<void> | ||
watchPath(path: string, listener?: WatchEventListener): Promise<void> | ||
/** | ||
* Stop watching `path` (file or directory). | ||
* if `listener` is provided, it will stop receiving watch events for `path`. | ||
* if `listener is not provided, path will be unwatched with its listeners cleared. | ||
*/ | ||
unwatchPath(path: string, listener?: WatchEventListener): Promise<void> | ||
/** | ||
* Unwatch all watched paths. | ||
*/ | ||
unwatchAll(): Promise<void> | ||
unwatchAllPaths(): Promise<void> | ||
/** | ||
* Add a listener function. | ||
* It will start receiving watch events for all watched paths. | ||
* Add a global watch event listener. | ||
* It will receive watch events for all watched paths. | ||
*/ | ||
addListener(listener: WatchEventListener): void | ||
addGlobalListener(listener: WatchEventListener): void | ||
/** | ||
* Remove a listener function. | ||
* It will stop receiving watch events. | ||
* Remove a global watch event listener. | ||
*/ | ||
removeListener(listener: WatchEventListener): void | ||
removeGlobalListener(listener: WatchEventListener): void | ||
/** | ||
* Remove all existing listeners. | ||
* Clears all registered global watch event listeners. | ||
*/ | ||
removeAllListeners(): void | ||
clearGlobalListeners(): void | ||
} | ||
@@ -36,0 +44,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33725
771