Skip to content

Commit 84b971f

Browse files
committed
added todo for callback handling
1 parent b35d05c commit 84b971f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/fs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,6 +1659,8 @@ function stat(path, options, callback) {
16591659
options.signal.addEventListener('abort', onAbort, { __proto__: null, once: true });
16601660
}
16611661

1662+
// TODO(mertcanaltin): Refactor callback handling to avoid double-wrapping and redundant validations.
1663+
// The current implementation validates and wraps the callback twice in the happy path; optimize when possible.
16621664
req.oncomplete = (err, stats) => {
16631665
if (options.signal) {
16641666
options.signal.removeEventListener('abort', onAbort);

0 commit comments

Comments
 (0)