🔥 You can create a Type Guard in TypeScript by using the is keyword in a functions return type.
is
Typescript Never Type Is Great When Coding An If Else Or Switch Statement
The Difference Between The Any And Unknown Type In Typescript