You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/docs/gentype/latest/getting-started.mdx
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ Add a `gentypeconfig` section to your `bsconfig.json` (See [Configuration](#conf
29
29
"language": "typescript",
30
30
"shims": {},
31
31
"generatedFileExtension": ".gen.tsx",
32
+
"module": "es6",
32
33
"debug": {
33
34
"all": false,
34
35
"basic": false
@@ -51,6 +52,7 @@ structure:
51
52
"gentypeconfig": {
52
53
"language":"typescript"|"flow"|"untyped",
53
54
"generatedFileExtension":".gen.tsx",
55
+
"module":"es6"|"commonjs",
54
56
"shims": {
55
57
"ReasonReact":"ReactShim"
56
58
}
@@ -64,6 +66,9 @@ structure:
64
66
-`"typescript"` : Generate `*.gen.tsx` files written in TypeScript.
65
67
-`"flow"`: Generate `*.gen.js` files with Flow type annotations.
66
68
-`"untyped"`: Generate `*.gen.js` files in vanilla JavaScript.
69
+
70
+
-**module**
71
+
- Module format used for the generated `*.gen.tsx` files (supports `"es6"` and `"commonjs"`)
67
72
68
73
-**shims**
69
74
- 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.
0 commit comments