How to use the tslib.__asyncGenerator 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 qmit-pro / moleculer-api / dist / schema / plugin / protocol / graphql / handler / options.js View on Github external
function dummyGenerator(count = 10, sleep = 1000) {
    return tslib_1.__asyncGenerator(this, arguments, function* dummyGenerator_1() {
        let i = 0;
        while (i < count) {
            yield tslib_1.__await(new Promise(resolve => setTimeout(resolve, sleep)));
            yield yield tslib_1.__await(i++);
        }
    });
}
resolvers.Subscription = {