How to use the __generator function from tslib

Find comprehensive JavaScript tslib.__generator code examples handpicked from public code repositorys.

153
154
155
156
157
158
159
160
161
162
 * @param cancellationToken The eventual cancellation token for the waiting.
 */
WaitOptions.prototype.waitForNextPoll = function (validationOverview, cancellationToken) {
    return tslib.__awaiter(this, void 0, void 0, function () {
        var delay, timespanMatch, hours, minutes, seconds;
        return tslib.__generator(this, function (_a) {
            // Throws in the event the user requested to cancel a pending waiting
            if (cancellationToken) {
                cancellationToken.throwIfCancellationRequested();
            }
fork icon2
star icon8
watch icon2

+ 71 other calls in file

50
51
52
53
54
55
56
57
58
59
}
exports.run = run;
function runWorker(options, logger) {
    return tslib_1.__awaiter(this, void 0, void 0, function () {
        var test_1, results, _a, output, errorCount;
        return tslib_1.__generator(this, function (_b) {
            switch (_b.label) {
                case 0:
                    if (options.init) {
                        if (fs.existsSync(configuration_1.JSON_CONFIG_FILENAME)) {
fork icon0
star icon0
watch icon1

+ 24 other calls in file