diff options
author | Luca Casonato <hello@lcas.dev> | 2021-11-23 11:30:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 11:30:24 +0100 |
commit | ae34f8fa10f4daddde3d32cc63773d288253d4d4 (patch) | |
tree | 659e9796677c1a625a0b8b53f7b5bd805227f404 /cli/dts/lib.deno.ns.d.ts | |
parent | 2eae1ae665ff601b86e936ad9d80cfa57831ce88 (diff) |
fix: support "other" event type in FSWatcher (#12836)
This commit adds support for "other" events in `FSWatcher`. Flags on
events are now exposed via the `flag` property on `FsEvent`.
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 9af3699de..74aa334e2 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -2007,9 +2007,23 @@ declare namespace Deno { */ export function resources(): ResourceMap; + /** + * Additional information for FsEvent objects with the "other" kind. + * + * - "rescan": rescan notices indicate either a lapse in the events or a + * change in the filesystem such that events received so far can no longer + * be relied on to represent the state of the filesystem now. An + * application that simply reacts to file changes may not care about this. + * An application that keeps an in-memory representation of the filesystem + * will need to care, and will need to refresh that representation directly + * from the filesystem. + */ + export type FsEventFlag = "rescan"; + export interface FsEvent { - kind: "any" | "access" | "create" | "modify" | "remove"; + kind: "any" | "access" | "create" | "modify" | "remove" | "other"; paths: string[]; + flag?: FsEventFlag; } /** |