You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Types of property 'otherKey' are incompatible.
Type 'number | undefined' is not assignable to type 'string | undefined'.
Type 'number' is not assignable to type 'string | undefined'.(2322)
if you remove the _id property from types WithNumberId and WithNumberString altogether the error remains.
if you remove the otherKey property it's gone.
This is the correct behavior. At its initialization, convertedData has a declared property of type string inhabited (possibly) by a value of type number.
Activity
x87 commentedon May 14, 2020
This is expected due to a breaking change #37195
micheleangioni commentedon May 14, 2020
Are you sure Seemann (@x87) ? The NON optional _id property is causing the problem.
x87 commentedon May 14, 2020
Michele Angioni (@micheleangioni) the error says:
if you remove the
_idproperty from typesWithNumberIdandWithNumberStringaltogether the error remains.if you remove the
otherKeyproperty it's gone.RyanCavanaugh commentedon May 14, 2020
This is the correct behavior. At its initialization,
convertedDatahas a declared property of typestringinhabited (possibly) by a value of typenumber.micheleangioni commentedon May 15, 2020
Ok, thanks Ryan Cavanaugh (@RyanCavanaugh) for pointing out is was due to 'otherKey' :)