2023-03-27 09:59:36 +03:00
|
|
|
/* tslint:disable */
|
|
|
|
/* eslint-disable */
|
|
|
|
|
|
|
|
/* auto-generated by NAPI-RS */
|
|
|
|
|
2023-05-10 12:16:48 +03:00
|
|
|
export interface WatchOptions {
|
|
|
|
recursive?: boolean;
|
2023-03-27 09:59:36 +03:00
|
|
|
}
|
2023-05-10 12:16:48 +03:00
|
|
|
/** Watcher kind enumeration */
|
|
|
|
export const enum WatcherKind {
|
|
|
|
/** inotify backend (linux) */
|
|
|
|
Inotify = 'Inotify',
|
|
|
|
/** FS-Event backend (mac) */
|
|
|
|
Fsevent = 'Fsevent',
|
|
|
|
/** KQueue backend (bsd,optionally mac) */
|
|
|
|
Kqueue = 'Kqueue',
|
|
|
|
/** Polling based backend (fallback) */
|
|
|
|
PollWatcher = 'PollWatcher',
|
|
|
|
/** Windows backend */
|
|
|
|
ReadDirectoryChangesWatcher = 'ReadDirectoryChangesWatcher',
|
|
|
|
/** Fake watcher for testing */
|
|
|
|
NullWatcher = 'NullWatcher',
|
|
|
|
Unknown = 'Unknown',
|
|
|
|
}
|
|
|
|
export function watch(
|
|
|
|
p: string,
|
|
|
|
options?: WatchOptions | undefined | null
|
|
|
|
): FSWatcher;
|
|
|
|
export class Subscription {
|
|
|
|
unsubscribe(): void;
|
|
|
|
}
|
|
|
|
export type FSWatcher = FsWatcher;
|
|
|
|
export class FsWatcher {
|
|
|
|
get kind(): WatcherKind;
|
|
|
|
toString(): string;
|
|
|
|
subscribe(
|
|
|
|
callback: (value: any) => any,
|
|
|
|
errorCallback?: (
|
|
|
|
err: Error | null,
|
|
|
|
value: undefined
|
|
|
|
) => any | undefined | null
|
|
|
|
): Subscription;
|
|
|
|
close(): void;
|
2023-03-27 09:59:36 +03:00
|
|
|
}
|