I hope to support generating type declarations by dividing modules based on files. #388
Open
3 tasks done
Labels
enhancement
New feature or request
Clear and concise description of the problem
Now, when I have the dirs configuration option, this plugin will automatically scan all exports in the files and generate type declarations for each exported content. However, sometimes I don't want to do this because it can directly pollute the namespace in certain scenarios. Therefore, I hope this plugin can support generating type declarations by dividing modules based on files.
Examples, if I have a file like this
and the
vite.config.ts
like thisIt will generate the dts file like this
But I want
If it can be done, then I can use it like this
I think this way, I don't have to worry about namespace issues anymore.
Suggested solution
I think it's able to add a configuration option for each path in
dirs
like thisIf
exportAllByFileName
istrue
, it will generate dts file just as I said above.Alternative
No response
Additional context
I tried to make some adjustments and would appreciate it if you could take a look to see if it meets the standards and requirements. Thank you very much.
Validations
The text was updated successfully, but these errors were encountered: