If there is an optional property prop1
for a react component, specifying prop1-={value}
is not giving type error
#46225
Labels
Question
An issue which isn't directly actionable in code
Example
I have a prop named
prop1
, however I have a typo where I have a-
after prop name, i.eprop1-={value}
, but TS is not giving error. On other hand if I give in an unknown property, it does throw error. Wonder why is-=
being considered valid assignment to the prop?The text was updated successfully, but these errors were encountered: