summaryrefslogtreecommitdiff
path: root/test/fixtures/source-map/typescript-throw.js
blob: 0c4e57756f708da493792cda0600d5778998dfbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var ATrue;
(function (ATrue) {
    ATrue[ATrue["IsTrue"] = 1] = "IsTrue";
    ATrue[ATrue["IsFalse"] = 0] = "IsFalse";
})(ATrue || (ATrue = {}));
if (false) {
    console.info('unreachable');
}
else if (true) {
    console.info('reachable');
}
else {
    console.info('unreachable');
}
function branch(a) {
    if (a === ATrue.IsFalse) {
        console.info('a = false');
    }
    else if (a === ATrue.IsTrue) {
        throw Error('an exception');
    }
    else {
        console.info('a = ???');
    }
}
branch(ATrue.IsTrue);
//# sourceMappingURL=typescript-throw.js.map