One may wonder why TypeScript doesn't complain when I write the following code:
return {
Price: value.rawPrice === null ? null : value.rawPrice
}
Yet it presents issues with this code:
return {
Price: null
}
This is particularly puzzling because the field Price
has a declared type of number.