From abd7a8a9cdc407169993c4282d45ec9f717c74bd Mon Sep 17 00:00:00 2001 From: Maxime Guerreiro Date: Wed, 23 Jun 2021 21:11:00 +0200 Subject: 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. --- core/ops_json.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ops_json.rs b/core/ops_json.rs index 995f94885..07208a420 100644 --- a/core/ops_json.rs +++ b/core/ops_json.rs @@ -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 -- cgit v1.2.3