Open ImLunaHey opened 11 months ago
BTW my issue isn't with comments missing overall its just some exist in the code and for some reason are being stripped out in the final type file where as others are being kept. 🤔
Related I'm assuming https://github.com/microsoft/TypeScript/issues/14619
You're right, this appears to be a bug. Those comments shouldn't be stripped away since they provide valuable editor hints to developers using this framework.
I'm not sure if TypeScript is stripping them or if it's Rollup, but I'll dig into this.
@sstur did you happen to find anything in regards to this?
I looked at this last month and came up empty. I have no idea why these comments are being stripped away by tsc
. I'll try to find some time to take a closer look.
If you cant find anything might I suggest using tsup
even if it's just for the dts
part, from what I've seen comments remain via it's dts option. 🤔
Here's the types that're being shipped right now with
@nbit/bun@0.9.0
. Notice the lack of comments on most of the types. For exampleallowStaticFrom
has no comment in the shipped types.https://github.com/sstur/nbit/blob/42b19884c84c3439897da9006ea126e3d2273ccd/packages/core/src/types/http.ts#L27-L31