From d6c6df3c2da3c226f028955506d2515d6e120834 Mon Sep 17 00:00:00 2001 From: Yawar Amin Date: Sat, 23 Oct 2021 15:00:17 -0400 Subject: [PATCH] Make @obj example generate an object Previously it was missing the `()` parameter and generating a function. --- misc_docs/syntax/decorator_obj.mdx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/misc_docs/syntax/decorator_obj.mdx b/misc_docs/syntax/decorator_obj.mdx index a0a76b706..0db03560e 100644 --- a/misc_docs/syntax/decorator_obj.mdx +++ b/misc_docs/syntax/decorator_obj.mdx @@ -17,15 +17,13 @@ with properties that match the function's parameter labels. @obj external action: (~name: string, unit) => _ = "" -let helloAction = action(~name="Hello") +let helloAction = action(~name="Hello", ()) ``` ```js -function helloAction(param) { - return { - name: "Hello", - } -} +var helloAction = { + name: "Hello" +}; ```