typeofOperatorWithBooleanType.ts(7,12): error TS2564: Property 'a' has no initializer and is not definitely assigned in the constructor.
typeofOperatorWithBooleanType.ts(36,1): error TS2695: Left side of comma operator is unused and has no side effects.


==== typeofOperatorWithBooleanType.ts (2 errors) ====
    // typeof  operator on boolean type
    declare var BOOLEAN: boolean;
    
    function foo(): boolean { return true; }
    
    class A {
        public a: boolean;
               ~
!!! error TS2564: Property 'a' has no initializer and is not definitely assigned in the constructor.
        static foo() { return false; }
    }
    namespace M {
        export var n!: boolean;
    }
    
    var objA = new A();
    
    // boolean type var
    var ResultIsString1 = typeof BOOLEAN;
    
    // boolean type literal
    var ResultIsString2 = typeof true;
    var ResultIsString3 = typeof { x: true, y: false };
    
    // boolean type expressions
    var ResultIsString4 = typeof objA.a;
    var ResultIsString5 = typeof M.n;
    var ResultIsString6 = typeof foo();
    var ResultIsString7 = typeof A.foo();
    
    // multiple typeof  operator
    var ResultIsString8 = typeof typeof BOOLEAN;
    
    // miss assignment operators
    typeof true;
    typeof BOOLEAN;
    typeof foo();
    typeof true, false;
    ~~~~~~~~~~~
!!! error TS2695: Left side of comma operator is unused and has no side effects.
    typeof objA.a;
    typeof M.n;
    
    // use typeof in type query
    declare var z: boolean;
    declare var x: boolean[];
    declare var r: () => boolean;
    z: typeof BOOLEAN;
    r: typeof foo;
    var y = { a: true, b: false};
    z: typeof y.a;
    z: typeof objA.a;
    z: typeof A.foo;
    z: typeof M.n;