Closed aryzing closed 2 months ago
Ah yeah, the current SolidJS adapter doesn't have proper typings to support autocomplete, but it should be relatively easy to port over from React adapter. Can you open a PR doing that? If not, I will be able to fix it this week.
Appreciate the encouragement, although I'm in the process of evaluating CSS libs and don't have the bandwidth to fix the issues I find with them
Ah yeah, the current SolidJS adapter doesn't have proper typings to support autocomplete, but it should be relatively easy to port over from React adapter.
What types are currently missing? Maybe I can help.
Actually I was wrong. The types DO already work. @aryzing Can you try restarting your TS server maybe? A few more questions:
Is this a JS file or TS?
Do you have a tsconfig.json?
I must be doing something wrong then, because the types are just now showing for me. Reproduction repo.
Found the issue! So the way macaron's solid and react adapter were implementing the type definitions was through vanilla-extract's internal types that were being accessed from the /dist
directory of the package. This worked fine when "moduleResolution"
in tsconfig.json
was set to "node"
, but when it's set to latest versions like "bundler"
or "nodenext"
, Typescript gives more importance to the "exports"
in package.json
, and vanilla-extract didn't export files from the /dist
directory there.
Since the example you had was indeed using "bundler"
, Typescript wasn't able to source the internal type defs.
This has been fixed in v1.5.2
now! Macaron now implements the type defs by itself.
That's great, thank you!
@Mokshit06 Hi there, the issue seems to still be present in 1.5.2
. For whatever reason, the published types still uses the wrong import in index.d.ts
file, but not in index.d.mts
file. Could you look into this?
I changed the import manually in my local installation, everything works fine after that.
Thanks for reporting this! Yeah I think I missed updating the exports in package.json
to index.d.mts
. Please update it to v1.5.3
:)
Seems the types are not working for
@macaron-css/solid
v1.5.1. I'm not getting any intellisense with v1.5.1. Is there something missing here?simplescreenrecorder-2024-03-24_19.54.20.webm