Repository navigation
Breaking Changes
@typescript/native-preview is no longer supported
tsgo now loads TypeScript Go from the typescript package only. Install TypeScript 7.1 or later:
npm rm @typescript/native-preview
npm i -D typescript@7.1.0-betaTo use a TypeScript Go build that is not installed as typescript, point tsgo.moduleUrl at it:
dts({
generator: 'tsgo',
tsgo: { moduleUrl: import.meta.resolve('typescript-next') },
})tsgo.path changed meaning on TypeScript 7.1+
On 7.1+, tsgo.path is the API server executable (passed as tsserverPath), not the tsgo CLI. You usually don't need to set it.
tsgo no longer reads the plugin's sourcemap option
On TypeScript 7.1+, tsgo reads compiler options only from your tsconfig. To get declaration maps, set compilerOptions.declarationMap: true in the tsconfig. Setting only sourcemap: true on the plugin produces no maps and prints a warning.
Deprecations
TypeScript 7.0
With TypeScript 7.0, tsgo still runs through the old CLI backend, but prints a warning. This backend will be removed in the next minor. It does not support custom languages, tsgo.vfs, or content mappers, and the only tsgo.* option it reads is tsgo.path. Upgrade to TypeScript 7.1 or later.
Top-level tsc options
The top-level build, incremental, parallel, eager, newContext and vue options are deprecated. Move them under tsc:
dts({
- vue: true,
- parallel: true,
- build: true,
+ tsc: {
+ vue: true,
+ parallel: true,
+ build: true,
+ },
})If you set the same option at the top level and under tsc (for example vue and tsc.vue), the plugin throws an error. emitJs stays at the top level.
🚨 Breaking Changes
- Add tsgo API and VFS support - by @sxzz in #290 (4cf77)
- Move vue option under tsc - by @sxzz (cb5b6)
🚀 Features
- Support tsgo content mappers - by @sxzz (20fff)
- Add built-in tsrs generator - by @sxzz and @sxzzbot in #330 (e26bf)
- Restore deprecated TypeScript 7.0 tsgo CLI backend - by @sxzzbot in #331 (8408f)
🐞 Bug Fixes
- Clarify supported TypeScript versions in errors - by @sxzz (05dc4)
- Don't treat destructured parameter names as dependencies - by @abrahamguo in #325 (f5d80)
- Support deprecated top-level tsc options - by @sxzz (453fa)
- Remove runtime chunk only used by dts chunks - by @sxzz and @sxzzbot in #329 (95709)
- tsc: Force declaration when emitting with the compiler - by @tlq5l and @sxzz in #324 (4244a)