New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose theme type var #1394
Conversation
✅ Deploy Preview for unocss ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
Maybe we should keep more expressive |
I'm open to that. Without restriction provides more flexibility, and maybe some people are comfortable with that. I would suggest extracting the |
the nuxt part has not been touched yet
@antfu is it ok to have the restriction that all themes should always extend the (sorry for the ping, as I'd like to merge/close the PR ASAP since it has to involve all packages) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any plans to resurrect this PR? |
This PR takes a try to type
Theme
in all official packages correctly, instead of omitting it or setting it toany
.c.c. This should close #1270, and previous related PR #1002, #1003
Attentions Required
T
, neitherT extends {}
norT extends Record<string, unknown>
, as this kind of restriction doesn't make any sense to me.@unocss/preset-uno
is the default preset, this means we cannot type the them e as a generic. The below code is theoretically not correct.unocss/packages/unocss/src/vite.ts
Lines 8 to 19 in 2180281