useUnknownInCatchVariables01.ts(6,10): error TS18046: 'e' is of type 'unknown'.
useUnknownInCatchVariables01.ts(7,10): error TS18046: 'e' is of type 'unknown'.
useUnknownInCatchVariables01.ts(8,10): error TS18046: 'e' is of type 'unknown'.


==== useUnknownInCatchVariables01.ts (3 errors) ====
    try {
        // ...
    }
    catch (e) {
        // error!
        void e.toUpperCase();
             ~
!!! error TS18046: 'e' is of type 'unknown'.
        void e++;
             ~
!!! error TS18046: 'e' is of type 'unknown'.
        void e();
             ~
!!! error TS18046: 'e' is of type 'unknown'.
    
        if (typeof e === "string") {
            // works!
            // We've narrowed 'e' down to the type 'string'.
            console.log(e.toUpperCase());
        }
        if (e instanceof Error) {
            e.stack?.toUpperCase();
        }
        if (typeof e === "number") {
            e.toExponential();
            e++;
        }
    }
    
    
    try {
        // ...
    }
    catch (e: any) {
        // All are allowed.
        void e.toUpperCase();
        void e.toExponential();
        void e();
    }