You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return type for resolveConfig does not accurately represent what will be returned for the theme config. It's typed as simply returning the config passed in (via UnwrapResolvables), but the resolved theme output potentially differs significantly from this.
I would expect all of the default theme keys to be present, unless overridden; and they should be merged with the contents of extend.
It's particularly problematic that config.theme.extend is preserved in the return type, but absent in the actual return value, causing typescript to allow a runtime error if this is accidentally accessed.
This issue was originally pointed out to me here: #6422 (comment)
The text was updated successfully, but these errors were encountered:
What version of Tailwind CSS are you using?
v3.3.3
What version of Typescript are you using?
v5.2.2
What build tool (or framework if it abstracts the build tool) are you using?
Vite 4.5.0
What version of Node.js are you using?
v18.13.0
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction URL
https://github.com/baffalop/tailwind-resolveconfig-repro/blob/main/src/main.ts
Describe your issue
The return type for
resolveConfig
does not accurately represent what will be returned for thetheme
config. It's typed as simply returning the config passed in (viaUnwrapResolvables
), but the resolvedtheme
output potentially differs significantly from this.I would expect all of the default theme keys to be present, unless overridden; and they should be merged with the contents of
extend
.It's particularly problematic that
config.theme.extend
is preserved in the return type, but absent in the actual return value, causing typescript to allow a runtime error if this is accidentally accessed.This issue was originally pointed out to me here: #6422 (comment)
The text was updated successfully, but these errors were encountered: