0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

docs(core): Use op name in example (#11094)

The first argument to opSync/opAsync is the op name. In the examples,
the name is 'hello', and so it should be the first argument.
This commit is contained in:
Maxime Guerreiro 2021-06-23 21:11:00 +02:00 committed by GitHub
parent edab21ebab
commit abd7a8a9cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ use std::rc::Rc;
///
/// ...it can be invoked from JS using the provided name, for example:
/// ```js
/// let result = Deno.core.opSync("function_name", args);
/// let result = Deno.core.opSync("hello", args);
/// ```
///
/// `runtime.sync_ops_cache()` must be called after registering new ops
@ -68,7 +68,7 @@ where
///
/// ...it can be invoked from JS using the provided name, for example:
/// ```js
/// let future = Deno.core.opAsync("function_name", args);
/// let future = Deno.core.opAsync("hello", args);
/// ```
///
/// `runtime.sync_ops_cache()` must be called after registering new ops