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: packages/plugin-dts/README.md
+14-15Lines changed: 14 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ pluginDts({
136
136
});
137
137
```
138
138
139
-
> When [experiments.tsgo](#experimentstsgo) is enabled, if the project also enables [build](#build) or emits declaration files with different extensions to the same directory, `dtsExtension` may not work correctly.
139
+
> When [tsgo](#tsgo) is enabled, if the project also enables [build](#build) or emits declaration files with different extensions to the same directory, `dtsExtension` may not work correctly.
140
140
141
141
### alias
142
142
@@ -282,19 +282,14 @@ import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
282
282
283
283
- When set to `false`, the file extension will remain unchanged from the original import path in the rewritten import path of the output file (regardless of whether it is specified or specified as any value).
284
284
285
-
### experiments
286
-
287
-
-**Type:**`{ tsgo?: boolean }`
288
-
-**Default:**`{}`
289
-
290
-
Whether to enable experimental features.
291
-
292
-
#### experiments.tsgo
285
+
### tsgo
293
286
294
287
-**Type:**`boolean`
295
288
-**Default:**`false`
296
289
297
-
Whether to generate declaration files with [tsgo](https://github.com/microsoft/typescript-go).
290
+
Whether to generate declaration files with [tsgo](https://github.com/microsoft/typescript-go), which can provide faster generation of declaration files, especially for large projects.
291
+
292
+
> This feature is currently an **experimental feature**. Since tsgo is still in the **experimental stage**, there may be some bugs and unresolved issues or limitations. So, make sure to fully test it in your project before enabling this option.
> `@typescript/native-preview` requires Node.js 20.6.0 or higher.
308
303
309
-
2. Set `experiments.tsgo` to `true`.
304
+
2. Set `tsgo` to `true`.
310
305
311
306
```js
312
307
pluginDts({
313
-
experiments: {
314
-
tsgo:true,
315
-
},
308
+
tsgo:true,
316
309
});
317
310
```
318
311
319
-
> `tsgo` can provide faster generation of declaration files, especially for large projects. However, since `tsgo` is still experimental, there may be unresolved issues or limitations. Therefore, please make sure to thoroughly test it in your project before enabling this option.
312
+
3. In order to ensure the consistency of local development, you need to install the corresponding [VS Code Preview Extension](https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.native-preview) and add the following configuration in the VS Code settings:
0 commit comments