Skip to content

Commit 1947272

Browse files
committed
Remove bs.deriving abstract
1 parent 13f7d07 commit 1947272

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

docs/newcomer-examples.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,18 @@ let result: response(universityStudent) = fetchDataFromServer();
3838
Assuming you're compiling to JavaScript.
3939

4040
```reason
41-
[@bs.deriving abstract]
4241
type payload = {
4342
name: string,
4443
age: int
4544
};
4645
47-
let obj1 = payload(~name="John", ~age=30);
48-
46+
let student1 = {
47+
name: "John",
48+
age: 30,
49+
};
4950
/* Compiles to a JS object with the above fields */
5051
```
5152

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-
5453
## Modeling a JS Module with Default Export
5554

5655
See [here](https://bucklescript.github.io/docs/en/import-export.html#import-a-default-value).

0 commit comments

Comments
 (0)