Socket
Socket
Sign inDemoInstall

@file-services/types

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@file-services/types - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

29

cjs/watch-api.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc