TypeScript Type Guard Example
I was reviewing some TypeScript code this afternoon that had a type assertion (as) (also commonly called a ‘cast’) in there that could have been avoided by using a Type Guard. Type Guards are one of my favourite features of TypeScript. That makes me sound like a real nerd. But hey, I might convince you … Read more