What if TypeScript libraries published just .ts
sources to npm instead of .js
and .d.ts
files? This might already be tempting for Bun-only libraries, but how will that impact users? This is easy to answer by experimenting on existing libraries that ship .js
, .d.ts
, and .ts
files.
RxJS ships .js
and .d.ts
files, but also .ts
files for debugability purposes. By tweaking its package.json "exports"
, we can compare tsc
performance on this file with imports resolving to .d.ts
files vs .ts
source files:
import {} from "rxjs";