//// [getterControlFlowStrictNull.ts]
class A {
   a(): string | null {
        if (Math.random() > 0.5) {
            return '';
        }

        // it does error here as expected
    }
}
class B {
    get a(): string | null {
        if (Math.random() > 0.5) {
            return '';
        }

        // it should error here because it returns undefined
    }
}

//// [getterControlFlowStrictNull.js]
var __names = (this && this.__names) || (function() {
    var name = Object.defineProperty ? (function(proto, name) {
        Object.defineProperty(proto[name], 'name', { 
            value: name, configurable: true
        });
    }) : (function(proto, name) {
        proto[name].name = name;
    });
    return function (proto, keys) {
        for (var i = keys.length - 1; i >= 0; i--) {
            name(proto, keys[i])
        }
    };
})();
var A = (function () {
    function A() {
    }
    A.prototype.a = function () {
        if (Math.random() > 0.5) {
            return '';
        }
        // it does error here as expected
    };
    __names(A.prototype, ["a"]);
    return A;
}());
var B = (function () {
    function B() {
    }
    Object.defineProperty(B.prototype, "a", {
        get: function () {
            if (Math.random() > 0.5) {
                return '';
            }
            // it should error here because it returns undefined
        },
        enumerable: true,
        configurable: true
    });
    return B;
}());
