Open milindsingh opened 1 year ago
The error is misleading, because type matching is weird, but if you look at the editor you'll see a few errors at a few degrees of nesting:
availability
is wrong. You have http://schema.org/InStock
, but we expect https.Fixing that should fix this error!
I defined a wrapper class to store data, like
But when I assign a
Product
object, it recognizes asVehicle
and throw type error.Error:
Type '"Product"' is not assignable to type '"MotorizedBicycle"'.ts(2322)
Any help or guidance would be appreciated. Thanks