UNPKG

@openhps/core

Version:

Open Hybrid Positioning System - Core component

25 lines 798 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PushPromise = void 0; /** * A push promise is a promise that is returned when pushing a dataframe to a graph. */ class PushPromise extends Promise { constructor(executor) { super((resolve, reject) => { // Handle promise resolution or rejection and call `complete` executor(resolve, reject, () => { // This will be invoked by the custom "complete" handler if (this.oncompleted) { this.oncompleted(); } }); }); } completed(oncompleted) { this.oncompleted = oncompleted; return this; } } exports.PushPromise = PushPromise; //# sourceMappingURL=PushPromise.js.map