Current behavior
function View(props: ViewProps) { ... }
const ReflectedView = reflect({
view: View,
bind: {
someProp: "value",
}
})
- Props type of
ReflectedView is Exclude<ViewProps, "someProp">
ReflectedView will show type error on <ReflectedView someProp="other value" />
- But the value will still be passed to the component on top of the value from
bind, so this will work properly in runtime
Question
This is a bit confusing:
The library just highlights that prop was already taken, but in fact allows to override it.
What is desired behavior here?
- Should
reflect actually omit such values in runtime?
- Or these props just should not be excluded at the type level and must be made optional instead?