CodeZettaInterview Hub

TypeScript · Type Guards · Junior · Comparison

instanceof vs custom guards?

Short Interview Answer

instanceof uses prototype chain; custom guards for interfaces/plain objects.

Detailed Explanation

Interfaces don't exist at runtime — need discriminants or validators.

Did you know this answer?