Type conditional Syntax between props
Hey folks,
is there any way to check if
IOperation['content']
is of type string since JSX.Element extends from string
too ? But like in a way that we know for sure that IOperation['ctx']
will def be defined ?
I'm just asking a type conditional syntax here to make IOperation['ctx']
not optional only if content is of type number1 Reply
mb something like
?
it's called discriminatory unions
if it's props u could also do function overloading