UNPKG

serverless-offline-edge-lambda

Version:

A plugin for the Serverless Framework that simulates the behavior of AWS CloudFront Edge Lambdas while developing offline.

29 lines 833 B
"use strict"; var _a; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeferredPromise = void 0; /** * The `DeferredPromise` class provides a mechanism for resolving a promise from outside * its executor function. */ class DeferredPromise { constructor() { this[_a] = 'Promise'; this.promise = new Promise((resolve, reject) => { this.resolve = resolve; this.reject = reject; }); } then(onfulfilled, onrejected) { return this.promise.then(onfulfilled, onrejected); } catch(onrejected) { return this.promise.catch(onrejected); } finally(onfinally) { return this.promise.finally(onfinally); } } exports.DeferredPromise = DeferredPromise; _a = Symbol.toStringTag; //# sourceMappingURL=deferred-promise.js.map