Skip to content

Commit d6c6df3

Browse files
authored
Make @obj example generate an object
Previously it was missing the `()` parameter and generating a function.
1 parent 50ba7b9 commit d6c6df3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

misc_docs/syntax/decorator_obj.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ with properties that match the function's parameter labels.
1717
@obj
1818
external action: (~name: string, unit) => _ = ""
1919
20-
let helloAction = action(~name="Hello")
20+
let helloAction = action(~name="Hello", ())
2121
```
2222

2323
```js
24-
function helloAction(param) {
25-
return {
26-
name: "Hello",
27-
}
28-
}
24+
var helloAction = {
25+
name: "Hello"
26+
};
2927
```
3028

3129
</CodeTab>

0 commit comments

Comments
 (0)