Open Barbapapazes opened 3 weeks ago
Sounds good to me to export some of them yes, happy to open a PR?
Hey,
I'm not sure how to solve this. When I take a look at other packages like nuxt/content or nuxt/fonts, they handle exported types differently. How should I proceed? Is there any recommended way?
Would love to get your expertise on this @farnabaz
So far I think the best way to expose types in modules is to create a types/index.ts
file inside src directory and export it via module.ts
. This way, users can import types easily via module package
import { type Foo } from `package`
As for nuxt/content
, we discussed it and in next version types will be exposed from main package too.
Update: Seems that nuxt/image also do the same thing https://github.com/nuxt/image/blob/e7242fbc2bb37d484f1c903e8a28532973b11ddb/src/module.ts#L24
Update2: We can implement this in/after https://github.com/nuxt-hub/core/pull/138
If you think you can do it in #130, let's go! Otherwise, I'll wait and make a PR using your advices!
Hello 👋,
Do you thing that the blob types, https://github.com/nuxt-hub/core/blob/main/src/runtime/server/utils/blob.ts#L734-L739, could be exported? This could be helpful.
I'm validating a file on the frontend using zod and then on the backend using
ensureBlob
and I want common size and format so I use variables. My issue is that I'm not able to correctly type theses variables for theensureBlob
because I do no have access to these types.