79118226

Date: 2024-10-23 13:56:19
Score: 0.5
Natty:
Report link

You first need to assert the type of u and then change u.type's value.

(u as U).type = "y";

or if you want to assert u as Y you will have to assert it as unknown first because X and Y don't overlap.

(u as unknown as Y).type = "y";

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: iKingNinja