mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
doc: remove _Node.js style callback_
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: https://github.com/nodejs/node/pull/21701 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
This commit is contained in:
parent
b794d370d0
commit
01eee530e3
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user