Error TS1196: Catch clause variable type annotation
TypeScript's compiler doesn't allow custom type annotations for errors in try-catch statements. The simplest type guard is a conditional block with an instanceof check. Other type guards are presented in this article.