Files
node/doc/api
Gabriel Schulhof 7efb8f7619 n-api: implement promise
Promise is implemented as a pair of objects. `napi_create_promise()`
returns both a JavaScript promise and a newly allocated "deferred" in
its out-params. The deferred is linked to the promise such that the
deferred can be passed to `napi_resolve_deferred()` or
`napi_reject_deferred()` to reject/resolve the promise.

`napi_is_promise()` can be used to check if a `napi_value` is a native
promise - that is, a promise created by the underlying engine, rather
than a pure JS implementation of a promise.

PR-URL: https://github.com/nodejs/node/pull/14365
Fixes: https://github.com/nodejs/abi-stable-node/issues/242
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
2017-08-25 12:02:55 +03:00
..
2017-06-26 22:41:01 +03:00
2017-07-19 18:40:42 -04:00
2017-05-30 10:58:31 -07:00
2017-08-14 17:19:19 -04:00
2017-08-22 17:45:29 -04:00
2017-08-18 17:12:04 +03:00
2016-04-20 16:34:27 -07:00
2017-07-02 21:44:46 +02:00
2017-07-25 11:30:15 -04:00
2017-08-25 12:02:55 +03:00
2017-08-23 09:10:05 -07:00
2017-06-28 14:25:37 +02:00
2017-05-23 20:41:13 +02:00
2017-05-09 15:01:44 +02:00
2017-08-15 15:05:22 -05:00
2016-12-20 12:31:09 -08:00
2017-08-15 15:05:22 -05:00
2017-07-23 22:10:59 +03:00
2017-06-14 00:18:59 +02:00