@open-draft/deferred-promise
Advanced tools
Comparing version 1.2.1 to 1.3.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DeferredPromise = void 0; | ||
const IllegalStateError_1 = require("./IllegalStateError"); | ||
/** | ||
@@ -28,3 +27,3 @@ * Represents the completion of an asynchronous operation. | ||
if (this.state !== "pending") { | ||
throw new IllegalStateError_1.IllegalStateError("Cannot resolve a DeferredPromise: illegal state", this.state); | ||
return; | ||
} | ||
@@ -37,3 +36,3 @@ this.state = "resolved"; | ||
if (this.state !== "pending") { | ||
throw new IllegalStateError_1.IllegalStateError("Cannot reject a DeferredPromise: illegal state", this.state); | ||
return; | ||
} | ||
@@ -40,0 +39,0 @@ this.state = "rejected"; |
export * from "./DeferredPromise"; | ||
export * from "./IllegalStateError"; |
@@ -18,3 +18,2 @@ "use strict"; | ||
__exportStar(require("./DeferredPromise"), exports); | ||
__exportStar(require("./IllegalStateError"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@open-draft/deferred-promise", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "A Promise that can be resolved/rejected elsewhere", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11076
8
134