@byloth/core 1.4.1 → 1.5.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.js +186 -129
- package/dist/core.js.map +1 -1
- package/dist/core.umd.cjs +2 -2
- package/dist/core.umd.cjs.map +1 -1
- package/package.json +6 -6
- package/src/index.ts +5 -2
- package/src/models/aggregators/index.ts +1 -1
- package/src/models/exceptions/index.ts +22 -0
- package/src/models/index.ts +4 -4
- package/src/models/promises/deferred-promise.ts +18 -26
- package/src/models/promises/index.ts +2 -1
- package/src/models/promises/smart-promise.ts +15 -7
- package/src/models/promises/timed-promise.ts +73 -0
- package/src/models/subscribers.ts +2 -2
- /package/src/models/{exception.ts → exceptions/core.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReferenceException } from "./exceptions/index.js";
|
|
2
2
|
|
|
3
3
|
export default class Subscribers<P extends unknown[] = [], R = void, T extends (...args: P) => R = (...args: P) => R>
|
|
4
4
|
{
|
|
@@ -18,7 +18,7 @@ export default class Subscribers<P extends unknown[] = [], R = void, T extends (
|
|
|
18
18
|
const index = this._subscribers.indexOf(subscriber);
|
|
19
19
|
if (index < 0)
|
|
20
20
|
{
|
|
21
|
-
throw new
|
|
21
|
+
throw new ReferenceException("Unable to remove the requested subscriber. It was not found.");
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
this._subscribers.splice(index, 1);
|
|
File without changes
|