-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix Plugin type issue #14668
Fix Plugin type issue #14668
Conversation
@mrmckeb Thanks for the PR! This change looks reasonable but I’m not sure I understand what current issue this is fixing. I was looking at the I’m asking mostly because I see we have a bunch of other optional properties in the types for v3 and I wonder if they all need to be updated or if maybe it's fine the way it is right now. |
Hi @philipp-spiess, No problem, I can add more detail :) The types for the plugin, as per the DTS file, are:
So in this stricter mode of TypeScript, this is flagged as an issue. I'm not 100% sure where the |
Hi @philipp-spiess, any more feedback on this one? |
@mrmckeb Hey! sorry for not getting back earlier. Do you mind adding a changelog entry, something along those lines?
I'm having some issues pushing to your branch directly 🙈 |
Sorry @philipp-spiess - I was a little sick last week and this dropped off of my plate. I've updated the branch and added that entry in. You do have permission to write to this branch, so I'm not sure why you couldn't sorry! |
@mrmckeb Thanks a ton! Will merge this in but given our current focus on v4, it might take a while before we do a new v3 release unless something urgent needs fixing. |
This is a quick fix to an issue where the types for PluginsConfig don't match those used in plugins like
@tailwindcss/container-queries
.This was caught by TypeScript with
exactOptionalPropertyTypes
enabled, where TypeScript checks ifundefined
can be supplied as a value for optional types.I felt that it made more sense to fix this here, as it makes the core types more flexible, as opposed to each plugin needing to fix this when/if they hit it.