Closed tbakerx closed 2 years ago
if('v' in action) {}
Doesn't provide type safety to the compiler resulting in action.v remaining as type Value | undefined. This then throws type errors where v is expected to be type Value only
action.v
Value | undefined
Value
Mistaken, "exactOptionalPropertyTypes": true, compiler option makes this valid
"exactOptionalPropertyTypes": true,
Doesn't provide type safety to the compiler resulting in
action.v
remaining as typeValue | undefined
. This then throws type errors where v is expected to be typeValue
only