feat(native): NotifyEvent types

This commit is contained in:
LongYinan
2023-05-17 14:14:37 +08:00
parent f25b75c0d8
commit 6ab51b6d54
5 changed files with 50 additions and 8 deletions
+3 -5
View File
@@ -27,6 +27,7 @@ export function watch(
options?: WatchOptions | undefined | null
): FSWatcher;
export class Subscription {
toString(): string;
unsubscribe(): void;
}
export type FSWatcher = FsWatcher;
@@ -34,11 +35,8 @@ export class FsWatcher {
get kind(): WatcherKind;
toString(): string;
subscribe(
callback: (value: any) => any,
errorCallback?: (
err: Error | null,
value: undefined
) => any | undefined | null
callback: (event: import('./event').NotifyEvent) => void,
errorCallback?: (err: Error) => void
): Subscription;
close(): void;
}