Skip to content

Commit 8eb10f6

Browse files
committed
udpate gentype usage formatting
1 parent cbfab28 commit 8eb10f6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pages/docs/gentype/latest/usage.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ If both `Foo.resi` and `Foo.res` exist, the annotations are taken from `Foo.resi
111111

112112
The behaviour can be overridden by adding annotation `@genType.ignoreInterface` at the top of `Foo.resi`. Use case: expose implementation details to JS but not to ReScript.
113113

114-
115114
## Type Expansion and @genType.opaque
116115

117116
If an exported type `persons` references other types in its definition, those types are also exported by default, as long as they are defined in the same file:
@@ -199,14 +198,14 @@ let functionWithGenTypeAs =
199198
(~date: float) => @genType.as("type") (~type_: string) => ...
200199
```
201200

202-
**NOTE:** For technical reasons, it is not possible to use `@genType.as` on the first argument of a function (restriction lifted on OCaml 4.0.6).
201+
**NOTE:** For technical reasons, it is not possible to use `@genType.as` on the first argument of a function.
203202

204203
## Dependent Projects / Libraries
205204

206205
ReScript dependencies are specified in `bs-dependencies`.
207-
For example, if the dependencies are `"bs-dependencies": ["somelibrary"]` and `somelibrary` contains `Common.re`, this looks up the types of `foo` in the library:
206+
For example, if the dependencies are `"bs-dependencies": ["somelibrary"]` and `somelibrary` contains `Common.res`, this looks up the types of `foo` in the library:
208207

209-
```reason
208+
```res
210209
@genType
211210
let z = Common.foo;
212211
```

0 commit comments

Comments
 (0)