Skip to content

Commit 3fa04b5

Browse files
committed
fix: strongly type unlink events
The `unlink` and `unlinkDir` events both have known types, so this adds them to the known event map.
1 parent 69c115a commit 3fa04b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ export interface FSWatcherKnownEventMap {
303303
[EV.RAW]: Parameters<WatchHandlers['rawEmitter']>;
304304
[EV.ERROR]: Parameters<WatchHandlers['errHandler']>;
305305
[EV.ALL]: [EventName, ...EmitArgs];
306+
[EV.UNLINK]: [path: string];
307+
[EV.UNLINK_DIR]: [path: string];
306308
}
307309

308310
export type FSWatcherEventMap = FSWatcherKnownEventMap & {

0 commit comments

Comments
 (0)