From 0c8a3e6414cb766eba03a12e9c0be5377a8d17ed Mon Sep 17 00:00:00 2001 From: Xie Yuheng Date: Sun, 3 Oct 2021 22:03:23 +0800 Subject: [PATCH] fix Callback type (#116) --- lib/watch.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/watch.d.ts b/lib/watch.d.ts index fb214e5..9eca5d4 100644 --- a/lib/watch.d.ts +++ b/lib/watch.d.ts @@ -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; type FilterReturn = boolean | symbol;