79680133

Date: 2025-06-26 08:20:28
Score: 1
Natty:
Report link

The problem here is that the attribute author in Post differes from the one in PostWithNull, in Post its type is Author in PostWithNull its type is Author | null.

To solve your issue you could change the return type of your function with:

function getPostById(id: string): PostWithNull | null {
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ratinax