Skip to content

Commit

Permalink
fs: Add noop stub for FSWatcher.prototype.start
Browse files Browse the repository at this point in the history
* Motivation: In a previous PR, nodejs#29905, I made this method a private
method since it had no value to the user.

There was discussion that maybe it should have been a runtime deprecation
first, but was ultimatley decided that for this type of method, a
noop stub was a better option.

This Adds back in the method, but as a noop stub, while also keeping
the real implementation private
  • Loading branch information
lholmquist committed Oct 29, 2019
1 parent 1d89c5d commit 750d945
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/internal/fs/watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ FSWatcher.prototype[kFSWatchStart] = function(filename,
}
};

FSWatcher.prototype.start = () => {};

// This method is a noop if the watcher has not been started or
// has already been closed.
FSWatcher.prototype.close = function() {
Expand Down

0 comments on commit 750d945

Please sign in to comment.