TypeScript instanceof vs a Type Guard

Posted on Wed 08 June 2022 in tech

I was recently horrified to discover that TypeScript instanceof does not support interfaces. Of course this begs the question of it's utility, however I digress. The solution is to use a type guard:

Solana Parsed Instruction vs PartiallyDecodedInstruction