unjs/unimport

Question: what is the purpose of `defineUnimportPreset`?

Closed this issue · 1 comments

I was looking through the Nuxt source code and saw it uses defineUnimportPreset in some places. However, upon reading the source code here, it seems the defineUnimportPreset does nothing but return the passed in parameter. It doesn't even re-type it. What is the use of this function? Does it cause some obscure side effect that is desired, is it a "functional" way of ensuring the type of the preset is correct, or is it something else? If it is a type thing, why use that pattern over simply exporting the type information?