Closed efoken closed 1 year ago
Another one:
const CheckboxGroup: Component<{ value: string[] }> = () => <host />;
CheckboxGroup.props = {
value: {
type: Array,
reflect: true, // this should work according, because Array prop is reflectable
event: {
type: 'change',
bubbles: true,
},
},
}
Type '{ type: ArrayConstructor; reflect: true; event: { type: string; bubbles: true; }; }' is not assignable to type 'TypeAny | TypeArray<string[]>'.
Object literal may only specify known properties, and 'reflect' does not exist in type 'SchemaArray<string[]>'.ts(2322)
Describe the bug I'm trying to update from Atomico 1.66.0 to 1.66.1 and now getting many type errors – some are okay, some not.
Here is a simplified example from our code:
The
defaultProps
object is coming from our shared code base – because we use them in React Native too, and we want to have shared default props between both code bases.Before this worked fine, now we get this error:
If I remove the
InputProps
fromdefaultProps
it works, but this is not what we want, because we will loose type-safety then:To Reproduce Steps to reproduce the behavior:
Expected behavior No TypeScript error.