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:
parent
edab21ebab
commit
abd7a8a9cd
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue