Hi, when using the kotlin react hook `functionalCo...
# javascript
j
Hi, when using the kotlin react hook
functionalComponent (props: P) -> dynamic
and configuring a subtype of
P
props using a dsl should the compiler error if none of the members in the subtype are set? I see it producing undefined errors when running in the browser
props
Component
I expect the following to not compile
should not compile?
b
No, and there is no way to express such requirements.
j
Can I ask why not? When an interface is implemented, the compiler knows if the contract is met or not. Similarly the compiler knows when a variable is not initialized. Why is this diffferent?
b
Right now there is no way to say compiler that an instance passed to lambda is not initialized and compiler don’t track this case.