DEV Community

Discussion on: Keeping TypeScript Type Guards safe and up to date (a simpler solution)

Collapse
 
cohlar profile image
cohlar

Very cool, thanks for sharing! I was looking for exactly that and intend to adapt it to assertion functions.

Just a quick note - I'm not sure why those complicated hasOwnProperty and hasOwn types are needed, and I simplified as follows.
Would love to hear from you @noriste @alexis what could go wrong with my code.

Collapse
 
noriste profile image
Stefano Magni

Uhm, I think you are right, we do not need them...