Skip to content

Commit

Permalink
fix: strongly type unlink events
Browse files Browse the repository at this point in the history
The `unlink` and `unlinkDir` events both have known types, so this adds
them to the known event map.
  • Loading branch information
43081j committed Dec 18, 2024
1 parent 69c115a commit 3fa04b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ export interface FSWatcherKnownEventMap {
[EV.RAW]: Parameters<WatchHandlers['rawEmitter']>;
[EV.ERROR]: Parameters<WatchHandlers['errHandler']>;
[EV.ALL]: [EventName, ...EmitArgs];
[EV.UNLINK]: [path: string];
[EV.UNLINK_DIR]: [path: string];
}

export type FSWatcherEventMap = FSWatcherKnownEventMap & {
Expand Down

0 comments on commit 3fa04b5

Please sign in to comment.