paulmillr / chokidar

Minimal and efficient cross-platform file watching library
https://paulmillr.com
MIT License
10.8k stars 574 forks source link

update fs.FSWatcher types to satisfy nodejs versions >= 16; fixes #1299 #1300

Closed ben-polinsky closed 7 months ago

ben-polinsky commented 7 months ago

Fix for #1299.

The ref and unref methods have been in fs.FSWatcher since node v14, a version which hit eol on 2023-04-30. These types should be added to support types on currently supported node versions.

Although these changes to node were made in v14, it doesn't seem like the types were updated until v16, which is perhaps part of the confusion (devDependencies @types/node is pinned to 14).