-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
resolveConfig returns wrong TypeScript type for theme keys #9929
Comments
Hey! Thank you for your bug report! This should be fixed by #9972, and will be available in the next release. You can already try it by using the insiders build |
I experienced this issue because I did not have the type annotation in my tailwind.config.js: /** @type {import('tailwindcss').Config} */
module.exports = {
content: [
// ...
],
theme: {
extend: {},
},
plugins: [],
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Tailwind CSS are you using?
3.2.4
What build tool (or framework if it abstracts the build tool) are you using?
Vite 3.2.4
What version of Node.js are you using?
16.18.1
What browser are you using?
N/A
What operating system are you using?
Linux
Reproduction URL
Repro on CodeSandbox (may take a second or click in the editor for the IDE to pick up the type issue)
Describe your issue
Using the recently exposed resolveConfig types, many config keys (such as
theme.colors
) throw TS errors:ResolvableTo<T>
is an internal type that equalsT | ((utils: PluginUtils) => T)
- presumably a type that gets resolved duringresolveConfig
. The expected colour key (gray, in this case) doesn't exist on the function type, causing the issue. I suspect the resolved config should return the expectedRecursiveKeyValuePair
type withResolvableTo
removed.The text was updated successfully, but these errors were encountered: