Skip to content

Commit 53430a8

Browse files
committed
Finish updating getting-started.
1 parent 58cb038 commit 53430a8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pages/docs/gentype/latest/getting-started.mdx

+5-6
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ For running `genType` with ReScript via `npm` workflow, no special setup is requ
4242
## Configuration
4343

4444
Every `genType` powered project requires a configuration item `"gentypeconfig"`
45-
at top level in the project's `bsconfig.json`. (The use of a separate file
46-
`gentypeconfig.json` is being deprecated). The configuration has following
45+
at top level in the project's `bsconfig.json`. The configuration has following
4746
structure:
4847

4948
```js
@@ -63,12 +62,12 @@ structure:
6362
- `"untyped"`: Generate `*.gen.js` files in vanilla JavaScript.
6463

6564
- **shims**
66-
- e.g. `Array<string>` with format: `"RescriptModule=JavaScriptModule"`
67-
- Required to export certain basic ReScript data types to JS when one cannot modify the sources to add annotations (e.g. exporting ReScript lists)
65+
- Required only if one needs to export certain basic ReScript data types to JS when one cannot modify the sources to add annotations (e.g. exporting ReScript lists), and if the types are not first-classed in genType.
66+
- Example: `Array<string>` with format: `"RescriptModule=JavaScriptModule"`
6867

6968
## Adding Shims (TS & Flow)
7069

71-
A shim is a TS / Flow file that provides user-defined definitions for library types.
70+
A shim is a TS / Flow file that provides user-provided definitions for library types.
7271

7372
Configure your shim files within `"gentypeconfig"` in your [`bsconfig.json`](https://github.com/reason-association/genType/blob/master/examples/typescript-react-example/bsconfig.json), and add relevant `.shims.js` files in a directory which is visible by ReScript e.g. [`src/shims/`](https://github.com/reason-association/genType/blob/master/examples/typescript-react-example/src/shims). An example shim to export ReactEvent can be found [here](https://github.com/reason-association/genType/blob/master/examples/typescript-react-example/src/shims/ReactEvent.shim.ts).
7473

@@ -90,8 +89,8 @@ We prepared some examples to give you an idea on how to integrate `genType` in y
9089

9190
**Please make sure to build genType before trying to build the examples.**
9291

93-
- [flow-react-example](https://github.com/reason-association/genType/tree/master/examples/flow-react-example)
9492
- [typescript-react-example](https://github.com/reason-association/genType/tree/master/examples/typescript-react-example)
93+
- [flow-react-example](https://github.com/reason-association/genType/tree/master/examples/flow-react-example)
9594
- [untyped-react-example](https://github.com/reason-association/genType/tree/master/examples/untyped-react-example)
9695

9796
## Experimental features

0 commit comments

Comments
 (0)