Open Stadly opened 11 months ago
Thank you @Stadly
for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I
find a solution.
In the meantime providing more details and reproduction links would be
helpful.
@Stadly did you solve this? I have the same issue.
@Stadly did you solve this? I have the same issue.
Try setting "esModuleInterop": true
in tsconfig.json
. Got no idea why, but I think that's what solved it for me.
Let's close this issue if you can confirm that it works :)
What version of daisyUI are you using?
v4.4.19
Which browsers are you seeing the problem on?
All browsers
Reproduction URL
https://stackblitz.com/edit/stackblitz-starters-upqwgb?file=tailwind.config.ts
Describe your issue
When importing daisyUI as an ES module its type is inferred as
any
instead of the correct type. Consider the following:npx eslint .
gives the following error:There is no error on line 10, so the type of
forms
is inferred correctly, while the type ofdaisyui
is inferred asany
. I included@tailwindcss/forms
just to show that it is possible for the type to be inferred correctly, and hopefully looking at that package can help with solving the issue.Reproduction:
npx eslint .
in the terminal