@open-draft/deferred-promise
Advanced tools
Comparing version 1.1.1 to 1.2.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DeferredPromise = void 0; | ||
const IllegalStateError_1 = require("./IllegalStateError"); | ||
/** | ||
@@ -27,3 +28,3 @@ * Represents the completion of an asynchronous operation. | ||
if (this.state !== "pending") { | ||
throw new TypeError(`Cannot resolve a DeferredPromise: illegal state ("${this.state}")`); | ||
throw new IllegalStateError_1.IllegalStateError("Cannot resolve a DeferredPromise: illegal state", this.state); | ||
} | ||
@@ -36,3 +37,3 @@ this.state = "resolved"; | ||
if (this.state !== "pending") { | ||
throw new TypeError(`Cannot reject a DeferredPromise: illegal state ("${this.state}")`); | ||
throw new IllegalStateError_1.IllegalStateError("Cannot reject a DeferredPromise: illegal state", this.state); | ||
} | ||
@@ -39,0 +40,0 @@ this.state = "rejected"; |
@@ -1,1 +0,2 @@ | ||
export * from './DeferredPromise'; | ||
export * from "./DeferredPromise"; | ||
export * from "./IllegalStateError"; |
@@ -18,2 +18,3 @@ "use strict"; | ||
__exportStar(require("./DeferredPromise"), exports); | ||
__exportStar(require("./IllegalStateError"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@open-draft/deferred-promise", | ||
"version": "1.1.1", | ||
"version": "1.2.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
12421
11
153