Skip to content

Add FSWatcher.start function docs

There was // FIXME in the fs module for documenting the undocumented FSWatcher.start method.

This PR adds docs for that function.

Although, while looking into that function, it doesn't really make sense to have it exposed to an end user. A user can't actually create an instance of a FSWatcher by themselves, they get it as a result of calling fs.watch, which will call start when a valid filename is given. If the user calls start again on an already started watcher, then it is a noop. Calling start on a closed watcher also does nothing.

I wonder if we should consider making this a "private" method. It might be more effort than it is worth though and docs might just be enough

There are 2 more "FIXME"'s in this module related to docs that i'm planning on sending PR's for, but wanted to get some input on the above paragraph, since they are very similar

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading