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
Is your feature request related to a problem? Please describe.
Typescript 4.4 introduced a new feature, exactOptionalPropertyTypes. The default value is false but the recommended value is true.
Describe the solution you'd like
Theme UI needs some type improvements to work correctly with this setting enabled.
Additional context
Here is an example of an error that occurs only when this setting is enabled:
Type '{ slot?: string | undefined; style?: CSSProperties | undefined; title?: string | undefined; key?: Key | null | undefined; defaultChecked?: boolean | undefined; ... 285 more ...; opacity?: ResponsiveValue<...> | undefined; }' is not assignable to type 'BoxOwnProps'.
Types of property 'color' are incompatible.
Type 'string | undefined' is not assignable to type 'ResponsiveValue<never, Required<Theme<TLengthStyledSystem>>> | undefined'.
Type 'string' is not assignable to type 'ResponsiveValue<never, Required<Theme<TLengthStyledSystem>>> | undefined'. ts(2322)
I believe the issue may be upstream in @types/styled-system, but I don't understand how to diagnose it well enough to report it. I'm hoping somebody with more TypeScript knowledge could figure out how to get this working.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Typescript 4.4 introduced a new feature,
exactOptionalPropertyTypes
. The default value isfalse
but the recommended value istrue
.Describe the solution you'd like
Theme UI needs some type improvements to work correctly with this setting enabled.
Additional context
Here is an example of an error that occurs only when this setting is enabled:
The error appears on
Box
:I believe the issue may be upstream in
@types/styled-system
, but I don't understand how to diagnose it well enough to report it. I'm hoping somebody with more TypeScript knowledge could figure out how to get this working.The text was updated successfully, but these errors were encountered: