Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
squash: add a comment for future maintainers
  • Loading branch information
lholmquist committed Oct 29, 2019
commit 9b836a82e9c84bb47af562267c0cb7ef2c411540
4 changes: 4 additions & 0 deletions lib/internal/fs/watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ FSWatcher.prototype[kFSWatchStart] = function(filename,
}
};

// To maximize backword-compatiblity for the end user
Comment thread
lholmquist marked this conversation as resolved.
Resolved
// a no-op stub method has been added instead of
// totally removing FSWatcher.prototpye.start.
// This should not be documented
Comment thread
lholmquist marked this conversation as resolved.
Resolved
FSWatcher.prototype.start = () => {};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding a comment explaining that this is to maximize backward-compatibility for end users but this function should not be documented? Otherwise, someone else might come along later and remove it as unused or something?

@lholmquist lholmquist Oct 29, 2019 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point and makes sense. I'll add a little comment


// This method is a noop if the watcher has not been started or
Expand Down