byots icon indicating copy to clipboard operation
byots copied to clipboard

TS 5.0 module conversion will require changing how internal types are obtained

Open jakebailey opened this issue 3 years ago • 0 comments

https://github.com/microsoft/TypeScript/pull/51387 majorly changes how TypeScript is built and packaged.

One thing that differs is that disabling stripInternal is no longer the way to obtain our internal API.

Instead, running the dts task in our repo will produce these files:

-rw-r--r-- 1 jabaile jabaile 635K Nov  3 13:45 tsserverlibrary.d.ts
-rw-r--r-- 1 jabaile jabaile 1.5M Nov  3 13:45 tsserverlibrary.internal.d.ts
-rw-r--r-- 1 jabaile jabaile 466K Nov  3 13:45 typescript.d.ts
-rw-r--r-- 1 jabaile jabaile 1.3M Nov  3 13:45 typescript.internal.d.ts

You should be able to rename and ship the .internal.d.ts files for this package. I believe this will also mean you can drop all of your post-build patches; the internal API d.ts files are now checked in our tests so should contain a type-complete set of exports.

jakebailey avatar Nov 03 '22 20:11 jakebailey