How to use the __awaiter function from tslib

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

151
152
153
154
155
156
157
158
159
160
 *
 * @param validationOverview The validation overview to wait against.
 * @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) {
fork icon2
star icon8
watch icon2

+ 63 other calls in file

640
641
642
643
644
645
646
647
648
649
            yield fs.promises.copyFile(this.declarationFile, this.declarationReleaseFile);
        }));
    }
    if (pub) {
        const date = (Date.now() / 1000) | 0;
        yield logger__default["default"].start(`publishing v${pkg.version} ${date}`, () => tslib.__awaiter(this, void 0, void 0, function* () {
            yield execAsync(`npm publish ${this.releaseFolder}`);
        }));
    }
});
fork icon0
star icon0
watch icon1

+ 309 other calls in file

599
600
601
602
603
604
605
606
607
608
}
createClient(key, cert, pkg, index) {
    let app;
    return {
        name: 'client',
        writeBundle: () => tslib.__awaiter(this, void 0, void 0, function* () {
            var _a;
            if (!app) {
                app = express__default["default"]();
                const update = () => tslib.__awaiter(this, void 0, void 0, function* () {
fork icon0
star icon0
watch icon1

+ 299 other calls in file

88
89
90
91
92
93
94
95
96
97
}
get abiEncoder() {
    return this._abiEncoder;
}
encodeLimitOrderCancellation(order, checkIsActiveOrder) {
    return tslib_1.__awaiter(this, void 0, void 0, function* () {
        if (!this._gelatoCore)
            throw new Error("No gelato limit orders contract");
        if (!order.inputToken)
            throw new Error("No input token in order");
fork icon0
star icon0
watch icon1

+ 54 other calls in file

26
27
28
29
30
31
32
33
34
35
var reading_1 = require("./files/reading");
var resolution_1 = require("./files/resolution");
var linter_1 = require("./linter");
var utils_1 = require("./utils");
function run(options, logger) {
    return tslib_1.__awaiter(this, void 0, void 0, function () {
        var error_2;
        return tslib_1.__generator(this, function (_a) {
            switch (_a.label) {
                case 0:
fork icon0
star icon0
watch icon1

+ 24 other calls in file