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).
Fix for #1299.
The
ref
andunref
methods have been infs.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).