How to use the tslib.__generator function in tslib

To help you get started, we’ve selected a few tslib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eserozvataf / evangelist / dist / npm / __tests__ / iterate.js View on Github external
test('basic', function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
        var gen1, total, func1, result;
        return tslib_1.__generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    gen1 = function gen() {
                        return tslib_1.__generator(this, function (_a) {
                            switch (_a.label) {
                                case 0: return [4, 1];
                                case 1:
                                    _a.sent();
                                    return [4, 2];
                                case 2:
                                    _a.sent();
                                    return [4, 3];
                                case 3:
                                    _a.sent();
                                    return [2];
                            }
github eserozvataf / immunity / dist / npm / __tests__ / prependToArray.js View on Github external
var gen1 = function gen() {
            return tslib_1.__generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4, 'b'];
                    case 1:
                        _a.sent();
                        return [4, 'c'];
                    case 2:
                        _a.sent();
                        return [2];
                }
            });
        };
        var val1 = 'a';
github eserozvataf / immunity / dist / npm / __tests__ / takeFromArray.js View on Github external
var gen1 = function gen() {
            return tslib_1.__generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4, 'a'];
                    case 1:
                        _a.sent();
                        return [4, 'b'];
                    case 2:
                        _a.sent();
                        return [4, 'c'];
                    case 3:
                        _a.sent();
                        return [2];
                }
            });
        };
        var int1 = 2;
github eserozvataf / immunity / dist / npm / __tests__ / appendToArray.js View on Github external
var gen1 = function gen() {
            return tslib_1.__generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4, 'a'];
                    case 1:
                        _a.sent();
                        return [4, 'b'];
                    case 2:
                        _a.sent();
                        return [2];
                }
            });
        };
        var val1 = 'c';
github eserozvataf / immunity / dist / npm / __tests__ / mergeArrays.js View on Github external
var gen1 = function gen() {
            return tslib_1.__generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4, 1];
                    case 1:
                        _a.sent();
                        return [4, 2];
                    case 2:
                        _a.sent();
                        return [4, 3];
                    case 3:
                        _a.sent();
                        return [2];
                }
            });
        };
        var arr1 = [4, 5];
github eserozvataf / immunity / dist / npm / __tests__ / removeFromArray.js View on Github external
var gen1 = function gen() {
            return tslib_1.__generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4, 1];
                    case 1:
                        _a.sent();
                        return [4, 2];
                    case 2:
                        _a.sent();
                        return [4, 3];
                    case 3:
                        _a.sent();
                        return [4, 4];
                    case 4:
                        _a.sent();
                        return [4, 5];
                    case 5:
                        _a.sent();
github eserozvataf / immunity / dist / npm / __tests__ / splitArray.js View on Github external
var gen1 = function gen() {
            return tslib_1.__generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4, 1];
                    case 1:
                        _a.sent();
                        return [4, 2];
                    case 2:
                        _a.sent();
                        return [4, 3];
                    case 3:
                        _a.sent();
                        return [4, 4];
                    case 4:
                        _a.sent();
                        return [4, 5];
                    case 5:
                        _a.sent();
github eserozvataf / immunity / dist / npm / __tests__ / reverseArray.js View on Github external
var gen1 = function gen() {
            return tslib_1.__generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4, 1];
                    case 1:
                        _a.sent();
                        return [4, 2];
                    case 2:
                        _a.sent();
                        return [4, 3];
                    case 3:
                        _a.sent();
                        return [4, 4];
                    case 4:
                        _a.sent();
                        return [4, 5];
                    case 5:
                        _a.sent();
github eserozvataf / immunity / dist / npm / __tests__ / pickFromArray.js View on Github external
var gen1 = function gen() {
            return tslib_1.__generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4, 1];
                    case 1:
                        _a.sent();
                        return [4, 2];
                    case 2:
                        _a.sent();
                        return [4, 3];
                    case 3:
                        _a.sent();
                        return [4, 4];
                    case 4:
                        _a.sent();
                        return [4, 5];
                    case 5:
                        _a.sent();