Skip to content

Commit

Permalink
fix Callback type (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng authored Oct 3, 2021
1 parent ac8c8e6 commit 0c8a3e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/watch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ declare function watch(pathName: PathName, callback: Callback): Watcher;
declare function watch(pathName: PathName, options: Options, callback: Callback): Watcher;

type EventType = 'update' | 'remove';
type Callback = (eventType ?: EventType, filePath ?: string) => any;
type Callback = (eventType: EventType, filePath: string) => any;
type PathName = string | Array<string>;
type FilterReturn = boolean | symbol;

Expand Down

0 comments on commit 0c8a3e6

Please sign in to comment.