unjs / mkdist

Lightweight file-to-file transpiler.
MIT License
367 stars 25 forks source link

feat: add declarationExt option #219

Open XiNiHa opened 5 months ago

XiNiHa commented 5 months ago

๐Ÿ”— Linked issue

โ“ Type of change

๐Ÿ“š Description

Adds declarationExt option that allows customizing extensions of .d.ts files.

The option behaves like this:

By introducing this option, it enables users to get declaration files with the correct extensions they should be. It was previously impossible to achieve when emitting multiple format of modules from a single source, since it would always emit .d.ts in that case. Now users can explicitly set declarationExt to have desired extensions, or use "infer" to let mkdist decide the best one.

๐Ÿ“ Checklist

BasixKOR commented 1 month ago

Hello, is there any blocker preventing this from getting merged?