We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13f7d07 commit 1947272Copy full SHA for 1947272
1 file changed
docs/newcomer-examples.md
@@ -38,19 +38,18 @@ let result: response(universityStudent) = fetchDataFromServer();
38
Assuming you're compiling to JavaScript.
39
40
```reason
41
-[@bs.deriving abstract]
42
type payload = {
43
name: string,
44
age: int
45
};
46
47
-let obj1 = payload(~name="John", ~age=30);
48
-
+let student1 = {
+ name: "John",
+ age: 30,
49
+};
50
/* Compiles to a JS object with the above fields */
51
```
52
-Note that the above isn't a record; this is a [special BuckleScript feature](https://bucklescript.github.io/docs/en/object.html#record-mode).
53
54
## Modeling a JS Module with Default Export
55
56
See [here](https://bucklescript.github.io/docs/en/import-export.html#import-a-default-value).
0 commit comments