becem-gharbi / nuxt-naiveui

Unofficial Naive UI module for Nuxt
https://nuxt-naiveui.bg.tn
MIT License
163 stars 20 forks source link

fix: export types #80

Closed OrbisK closed 1 month ago

OrbisK commented 1 month ago

at least ThemeConfig should be exported.

I think you should use module.d.ts as entry for types. so all exported stuff there is also exported to the package. i dont see any need to separate that :smiley:

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuxt-naiveui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 1:08pm
netlify[bot] commented 1 month ago

Deploy Preview for iconify-icon-sets canceled.

Name Link
Latest commit 9ed8750f19400b140042487a9facd149b89c7bce
Latest deploy log https://app.netlify.com/sites/iconify-icon-sets/deploys/66ead0b2ecea11000847c691
becem-gharbi commented 1 month ago

Hi, the nuxt Module starter uses the configuration with ./dist/types.d.ts types export [source]. To use the ThemeConfig interface in your app, refer to it from the exported ModuleOptions interface. Let me know if you have any issue :)

OrbisK commented 1 month ago

Hi, the nuxt Module starter uses the configuration with ./dist/types.d.ts types export [source].

I see. I had mistakenly assumed that types.d.ts is built from types/index.ts. but it seems to be generated by the module-build.

To use the ThemeConfig interface in your app, refer to it from the exported ModuleOptions interface. Let me know if you have any issue :)

yes, possible. it felt like it should be exported. then it should look like this

type ThemeConfig = ModuleOptions['themeConfig']