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
TypeScript Go support is powered by `ts-checker-rspack-plugin`'s experimental, CLI-based integration for [typescript-go](https://github.com/microsoft/typescript-go). It runs the `tsgo` binary for type checking and can reduce type-checking time by about 5-10x.
145
+
TypeScript Go support is powered by `ts-checker-rspack-plugin`'s experimental, CLI-based integration for [typescript-go](https://github.com/microsoft/typescript-go). It runs the TypeScript Go checker binary for type checking and can reduce type-checking time by about 5-10x.
146
146
147
-
To enable it, install `@typescript/native-preview` and set `typescript.tsgo` to `true`:
147
+
Install TypeScript 7.0 RC to use TypeScript Go automatically:
148
+
149
+
```sh
150
+
# with npm
151
+
npm install -D typescript@rc
152
+
153
+
# with yarn
154
+
yarn add -D typescript@rc
155
+
156
+
# with pnpm
157
+
pnpm add -D typescript@rc
158
+
```
159
+
160
+
You can also install `@typescript/native-preview` and set `typescript.tsgo` to `true`:
148
161
149
162
```ts
150
163
pluginTypeCheck({
@@ -156,7 +169,9 @@ pluginTypeCheck({
156
169
});
157
170
```
158
171
159
-
When `tsgo` is enabled, the default `typescript.typescriptPath` resolves to `@typescript/native-preview/package.json`. If you set `typescript.typescriptPath` manually in `tsgo` mode, it must be an absolute path to `@typescript/native-preview/package.json`.
172
+
When `tsgo` is enabled and `typescript.typescriptPath` is set manually, it must point to an absolute `typescript/package.json` path from TypeScript 7+ or `@typescript/native-preview/package.json`.
173
+
174
+
> The `@typescript/native-preview` usage is deprecated and kept only for compatibility. We recommend installing `typescript@rc` to use `tsgo`.
160
175
161
176
For supported options and limitations, see [ts-checker-rspack-plugin - TypeScript Go support](https://github.com/rstackjs/ts-checker-rspack-plugin#typescript-go-support).
0 commit comments