Releasing isolated declarations for standalone dts emit before TypeScript releases theirs 😛
It is at least 20 times faster than tsc on a single core, and probably 100 times faster when parallelized by a native bundler - as what
@robpalmer2 and the team envisioned when they championed this feature.
We require more test fixtures from the TypeScript conformance suite, but outputs are mostly correct compared to the isolated declarations branch in the vue core repo. We even had to port a few minor bugs to conform to the TypeScript output 😅
If you are a library author, you may want to start experimenting with isolated declarations.
If you are a build tool author, you may want to spin up a branch and experiment with `oxc-transform` to see the performance improvement, or the `transpileDeclaration` API from tsc to get your infra ready.
As for the future,
@rolldown_rs will be one of the first bundler to support isolated declarations, can't wait for its alpha release!
It is going to be some what difficult for esbuild to support this, as esbuild does not have TypeScript ast nodes nor typescript codegen.
swc should be able to support this, but require typescript codegen as well as time and energy from
@kdy1dev, who's really burned out right now 🥲
References:
* what is isolated declarations:
devblogs.microsoft.com/types…
* npm:
npmjs.com/package/oxc-transf…
benchmark:
github.com/oxc-project/bench…
* code:
github.com/oxc-project/oxc/t…
* Rolldown tracking issue:
github.com/rolldown/rolldown…