Skip to content

Commit 534a831

Browse files
Fix links
1 parent 5283161 commit 534a831

File tree

8 files changed

+17
-15
lines changed

8 files changed

+17
-15
lines changed

misc_docs/syntax/decorator_gentype.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ category: "decorators"
88

99
The `@genType` decorator may be used to export ReScript values and types to JavaScript, and import JavaScript values and types into ReScript. It allows seamless integration of compiled ReScript modules in existing TypeScript, or plain JavaScript codebases, without losing type information across different type systems.
1010

11-
[GenType](/docs/manual/latest/gentype-introduction) is a code generation tool for automatically generating [TypeScript](https://www.typescriptlang.org/) type definitions, and JS runtime converters for non-shared ReScript values. It also features first-class support for [rescript-react](/docs/react/latest/introduction) components.
11+
[GenType](/docs/manual/latest/typescript-integration) is a code generation tool for automatically generating [TypeScript](https://www.typescriptlang.org/) type definitions, and JS runtime converters for non-shared ReScript values. It also features first-class support for [rescript-react](/docs/react/latest/introduction) components.
1212

1313
### Example
1414

@@ -61,4 +61,4 @@ export const make: React.ComponentType<{
6161

6262
### References
6363

64-
* [GenType](/docs/manual/latest/gentype-introduction)
64+
* [TypeScript Integration](/docs/manual/latest/typescript-integration)

next.config.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,22 @@ const config = {
104104
},
105105
{
106106
source: "/docs/gentype/latest/introduction",
107-
destination: "/docs/manual/latest/gentype-introduction",
107+
destination: "/docs/manual/latest/typescript-integration",
108108
permanent: true,
109109
},
110110
{
111111
source: "/docs/gentype/latest/getting-started",
112-
destination: "/docs/manual/latest/gentype-introduction",
112+
destination: "/docs/manual/latest/typescript-integration",
113113
permanent: true,
114114
},
115115
{
116116
source: "/docs/gentype/latest/usage",
117-
destination: "/docs/manual/latest/gentype-introduction",
117+
destination: "/docs/manual/latest/typescript-integration",
118118
permanent: true,
119119
},
120120
{
121121
source: "/docs/gentype/latest/supported-types",
122-
destination: "/docs/manual/latest/gentype-introduction",
122+
destination: "/docs/manual/latest/typescript-integration",
123123
permanent: true,
124124
},
125125
];

pages/docs/manual/latest/build-configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ one of the following:
149149
- `".res.js"`
150150
- `".res.mjs"`
151151
- `".res.cjs"`
152-
<<<<<<< HEAD
153152

154153
### Design Decisions
155154

@@ -215,6 +214,7 @@ To enable genType, set `"gentypeconfig"` at top level in the project's `rescript
215214
`module`: Module format used for the generated `*.gen.tsx` files (supports `"es6"` and `"commonjs"`)
216215

217216
`moduleResolution`: Module resolution strategy used in genType outputs. This may be required for compatibility with TypeScript projects. Specify the value as the same in `tsconfig.json`.
217+
218218
- `"node"`(default): Drop extensions in import paths.
219219
- `"node16"`: Use TS output's extension. This provides compatibility with projects using `"moduleResolution": "node16"` and ES Modules.
220220
- `"bundler"`: Use TS input's extension. This provides compatibility with projects using `"moduleResolution": "bundler"` and ES Modules. This also requires TS v5.0+ and `compilerOptions.allowImportingTsExtensions` to `true`

pages/docs/manual/latest/typescript-integration.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ type t = { TAG: "A"; _0: number } | { TAG: "B"; _0: string };
2525

2626
## A Quick Example
2727

28-
Let's assume we are working on a TypeScript codebase and we want to integrate a single TypeScript function.
28+
Let's assume we are working on a TypeScript codebase and we want to integrate a single ReScript function.
2929

30-
We want to be able to import the function like any other in our existing TypeScript code, but we also want to preserve all the ReScript types in the TypeScript type system
30+
We want to be able to import the function like any other one in our existing TypeScript code, but we also want to preserve all the ReScript types in the TypeScript type system.
3131

3232
**That's exactly what genType was made for!**
3333

@@ -64,11 +64,13 @@ On a successful compile, `genType` will convert `src/Color.res` to a TypeScript
6464
/* eslint-disable */
6565
/* tslint:disable */
6666

67-
import * as ColorJS from './Color.res.js';
67+
import * as ColorJS from "./Color.res.js";
6868

6969
export type color = "Red" | "Blue";
7070

71-
export const printColorMessage: (color:color) => void = ColorJS.printColorMessage as any;
71+
export const printColorMessage: (
72+
color: color
73+
) => void = ColorJS.printColorMessage as any;
7274
```
7375

7476
genType automatically maps the `color` variant to TS via a string union type `"Red" | "Blue"`.

src/DocsOverview.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let default = (~showVersionSelect=true) => {
3636
let ecosystem = [
3737
("Package Index", "/packages"),
3838
("rescript-react", "/docs/react/latest/introduction"),
39-
("GenType", "/docs/manual/latest/gentype-introduction"),
39+
("GenType", "/docs/manual/latest/typescript-integration"),
4040
("Reanalyze", "https://github.com/reason-association/reanalyze"),
4141
]
4242

src/common/Constants.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let languageManual = version => {
2020
let ecosystem = [
2121
("Package Index", "/packages"),
2222
("rescript-react", "/docs/react/latest/introduction"),
23-
("GenType", "/docs/manual/latest/gentype-introduction"),
23+
("GenType", "/docs/manual/latest/typescript-integration"),
2424
("Reanalyze", "https://github.com/reason-association/reanalyze"),
2525
]
2626

src/components/Navigation.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ module DocsSection = {
190190
imgSrc: "/static/[email protected]",
191191
title: "GenType",
192192
description: "Seamless TypeScript integration",
193-
href: "/docs/manual/latest/gentype-introduction",
193+
href: "/docs/manual/latest/typescript-integration",
194194
isActive: url => {
195195
switch url.fullpath {
196196
| ["docs", "manual", _, fragment] => fragment->Js.String2.startsWith("gentype")

src/layouts/LandingPageLayout.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ module CuratedResources = {
577577
imgSrc: "/static/[email protected]",
578578
title: React.string("TypeScript Integration"),
579579
descr: "Learn how to integrate ReScript in your existing TypeScript codebases.",
580-
href: "/docs/manual/latest/gentype-introduction",
580+
href: "/docs/manual/latest/typescript-integration",
581581
},
582582
]
583583

0 commit comments

Comments
 (0)