Skip to content

Commit 8db80ff

Browse files
committed
Fix link, rephrase Js.t object in header to JS object
1 parent df7ee0e commit 8db80ff

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pages/docs/manual/latest/generate-converters-accessors.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ console.log(Belt_Array.map(pets, name).join("&"));
107107

108108
</CodeTab>
109109

110-
## Generate Converters for `Js.t` Object and Record
110+
## Generate Converters for JS Object and Record
111111

112112
> **Note:** In ReScript >= v7 [records are already compiled to JS
113113
> objects](bind-to-js-object#bind-to-record-like-js-objects). `@bs.deriving(jsConverter)` is therefore
@@ -154,7 +154,7 @@ external jsCoordinates : coordinates = "jsCoordinates";
154154

155155
### More Safety
156156

157-
The above generated functions use `Js.t` object types. You can also hide this implementation detail by making the object type **abstract** by using the `newType` option with `@bs.deriving(jsConverter)`:
157+
The above generated functions use JS object types. You can also hide this implementation detail by making the object type **abstract** by using the `newType` option with `@bs.deriving(jsConverter)`:
158158

159159
```res
160160
@bs.deriving({jsConverter: newType})
@@ -298,7 +298,7 @@ As in similar use-cases before, you can also use `@bs.deriving({jsConverter: new
298298

299299
## Convert Record Type to Abstract Record
300300

301-
> **Note**: For ReScript >= v7, we recommend using [plain records to compile to JS objects](#records-as-objects).
301+
> **Note**: For ReScript >= v7, we recommend using [plain records to compile to JS objects](bind-to-js-object#bind-to-record-like-js-objects).
302302
> This feature might still be useful for certain scenarios, but the ergonomics might be worse
303303
304304
Use `@bs.deriving(abstract)` on a record type to expand the type into a creation, and a set of getter / setter functions for fields and methods.
@@ -567,9 +567,9 @@ let whisperCatName = {
567567
}
568568
```
569569

570-
## Convert External into `Js.t` Object Creation Function
570+
## Convert External into JS Object Creation Function
571571

572-
Use `@bs.obj` on an `external` binding to create a function that, when called, will evaluate to a `Js.t` object with fields corresponding to the function's parameter labels.
572+
Use `@bs.obj` on an `external` binding to create a function that, when called, will evaluate to a JS object with fields corresponding to the function's parameter labels.
573573

574574
This is very handy because you can make some of those labelled parameters optional and if you don't pass them in, the output object won't include the corresponding fields. Thus you can use it to dynamically create objects with the subset of fields you need at runtime.
575575

@@ -602,7 +602,7 @@ external route: (
602602

603603
This function has four labelled parameters (the fourth one optional), one unlabelled parameter at the end (which we mandate for functions with [optional parameters](function#optional-labeled-arguments), and one parameter (`_method`) that requires an underscore prefix to avoid confusion with the ReScript keyword `method`.
604604

605-
Also of interest is the return type: `_`, which tells ReScript to automatically infer the full type of the `Js.t` object, sparing you the hassle of writing down the type manually!
605+
Also of interest is the return type: `_`, which tells ReScript to automatically infer the full type of the JS object, sparing you the hassle of writing down the type manually!
606606

607607
The function is called like so:
608608

pages/docs/manual/v8.0.0/generate-converters-accessors.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ console.log(Belt_Array.map(pets, name).join("&"));
138138

139139
</CodeTab>
140140

141-
## Generate Converters for `Js.t` Object and Record
141+
## Generate Converters for JS Object and Record
142142

143143
> **Note:** In ReScript >= v7 [records are already compiled to JS
144144
> objects](bind-to-js-object#bind-to-record-like-js-objects). `[@bs.deriving jsConverter]` is therefore
@@ -495,7 +495,7 @@ You can also use `[@bs.deriving {jsConverter: newType}]` to generate abstract ty
495495

496496
## Convert Record Type to Abstract Record
497497

498-
> **Note**: For ReScript >= v7, we recommend using [plain records to compile to JS objects](#records-as-objects).
498+
> **Note**: For ReScript >= v7, we recommend using [plain records to compile to JS objects](bind-to-js-object#bind-to-record-like-js-objects).
499499
> This feature might still be useful for certain scenarios, but the ergonomics might be worse
500500
501501
Use `[@bs.deriving abstract]` on a record type to expand the type into a creation, and a set of getter / setter functions for fields and methods.
@@ -928,7 +928,7 @@ let whisperCatName =
928928

929929
</CodeTab>
930930

931-
## Convert External into `Js.t` Object Creation Function
931+
## Convert External into JS Object Creation Function
932932

933933
Use `@bs.obj` on an `external` binding to create a function that, when called, will evaluate to a `Js.t` object with fields corresponding to the function's parameter labels.
934934

0 commit comments

Comments
 (0)