yuanchuan / node-watch

A wrapper and enhancements for fs.watch
https://npm.im/node-watch
MIT License
340 stars 44 forks source link

fix Callback type #116

Closed xieyuheng closed 3 years ago

xieyuheng commented 3 years ago

To let user of this library omit an argument in a callback function, we do not need to make the argument type optional.

On the other hand, making an argument type optional, will force the user handle the case where eventType or filePath is undefined (which will not happen.)

yuanchuan commented 3 years ago

Ah thank you!