You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/11-async/06-promisify/article.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ The code may look a bit complex, but it's essentially the same that we wrote abo
82
82
83
83
A call to `promisify(f)` returns a wrapper around `f``(*)`. That wrapper returns a promise and forwards the call to the original `f`, tracking the result in the custom callback `(**)`.
84
84
85
-
Here, `promisiefy` assumes that the original function expects a callback with exactly two arguments `(err, result)`. That's what we encounter most often. Then our custom callback is in exactly the right format, and `promisify` works great for such a case.
85
+
Here, `promisify` assumes that the original function expects a callback with exactly two arguments `(err, result)`. That's what we encounter most often. Then our custom callback is in exactly the right format, and `promisify` works great for such a case.
86
86
87
87
But what if the original `f` expects a callback with more arguments `callback(err, res1, res2, ...)`?
0 commit comments