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
I noticed that the TypeScript compiler produces an error in the createBox.ts file. At first I thought it was an issue in my code, but a fresh clone and open of restyle has the same issue.
I'm trying to make my own "Box" component for Pressable, so I was following the pattern of Box. I'm concerned because even if it works, I don't think it's a good idea to ship code that doesn't even pass the type-checker—it defeats the whole purpose.
Type 'BoxProps<Theme, EnableShorthand>' does not satisfy the constraint 'Record<string, unknown>'.
Type '(BackgroundColorProps<Theme> & OpacityProps<Theme> & VisibleProps<Theme> & LayoutProps<Theme> & ... 9 more ... & BackgroundColorShorthandProps<...>) | BaseBoxProps<...>' is not assignable to type 'Record<string, unknown>'.
Type 'BackgroundColorProps<Theme> & OpacityProps<Theme> & VisibleProps<Theme> & LayoutProps<Theme> & ... 9 more ... & BackgroundColorShorthandProps<...>' is not assignable to type 'Record<string, unknown>'.
Index signature for type 'string' is missing in type 'BackgroundColorProps<Theme> & OpacityProps<Theme> & VisibleProps<Theme> & LayoutProps<Theme> & ... 9 more ... & BackgroundColorShorthandProps<...>'.ts(2344)
The text was updated successfully, but these errors were encountered:
I noticed that the TypeScript compiler produces an error in the
createBox.ts
file. At first I thought it was an issue in my code, but a fresh clone and open of restyle has the same issue.I'm trying to make my own "Box" component for
Pressable
, so I was following the pattern of Box. I'm concerned because even if it works, I don't think it's a good idea to ship code that doesn't even pass the type-checker—it defeats the whole purpose.The text was updated successfully, but these errors were encountered: