Skip to content

Commit

Permalink
doc: remove _Node.js style callback_
Browse files Browse the repository at this point in the history
We refer to them only as _error-first callbacks_ in our docs. We don't
call them _Node.js style callbacks_ so let's take this opporutnity to
keep things a bit more concise

PR-URL: #21701
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
  • Loading branch information
Trott authored and targos committed Jul 9, 2018
1 parent 9716793 commit 1044baf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,11 @@ exactly how errors raised by those methods are propagated.
<!--type=misc-->

Most asynchronous methods exposed by the Node.js core API follow an idiomatic
pattern referred to as an _error-first callback_ (sometimes referred to as
a _Node.js style callback_). With this pattern, a callback function is passed
to the method as an argument. When the operation either completes or an error
is raised, the callback function is called with
the `Error` object (if any) passed as the first argument. If no error was
raised, the first argument will be passed as `null`.
pattern referred to as an _error-first callback_. With this pattern, a callback
function is passed to the method as an argument. When the operation either
completes or an error is raised, the callback function is called with the
`Error` object (if any) passed as the first argument. If no error was raised,
the first argument will be passed as `null`.

```js
const fs = require('fs');
Expand Down

0 comments on commit 1044baf

Please sign in to comment.