@furystack/utils
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -36,12 +36,2 @@ "use strict"; | ||
class ObservableValue { | ||
/** | ||
* @param initialValue Optional initial value | ||
*/ | ||
constructor(initialValue) { | ||
this._isDisposed = false; | ||
this.observers = new Set(); | ||
if (initialValue !== undefined) { | ||
this.currentValue = initialValue; | ||
} | ||
} | ||
get isDisposed() { | ||
@@ -116,4 +106,14 @@ return this._isDisposed; | ||
} | ||
/** | ||
* @param initialValue Optional initial value | ||
*/ | ||
constructor(initialValue) { | ||
this._isDisposed = false; | ||
this.observers = new Set(); | ||
if (initialValue !== undefined) { | ||
this.currentValue = initialValue; | ||
} | ||
} | ||
} | ||
exports.ObservableValue = ObservableValue; | ||
//# sourceMappingURL=observable-value.js.map |
@@ -29,2 +29,8 @@ "use strict"; | ||
/** | ||
* Disposes the ValueObserver instance. Unsubscribes from the observable | ||
*/ | ||
dispose() { | ||
this.observable.unsubscribe(this); | ||
} | ||
/** | ||
* @constructs ValueObserver<T> the ValueObserver instance | ||
@@ -38,10 +44,4 @@ * @param observable The related Observable object | ||
} | ||
/** | ||
* Disposes the ValueObserver instance. Unsubscribes from the observable | ||
*/ | ||
dispose() { | ||
this.observable.unsubscribe(this); | ||
} | ||
} | ||
exports.ValueObserver = ValueObserver; | ||
//# sourceMappingURL=value-observer.js.map |
{ | ||
"name": "@furystack/utils", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "General utilities", | ||
@@ -34,4 +34,4 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^29.2.2" | ||
"@types/jest": "^29.2.3" | ||
} | ||
} |
/** | ||
* Type that defines a deep partial generic object | ||
*/ | ||
export declare type DeepPartial<T> = { | ||
export type DeepPartial<T> = { | ||
[K in keyof T]?: DeepPartial<T[K]>; | ||
@@ -6,0 +6,0 @@ }; |
@@ -12,3 +12,3 @@ import type { Disposable } from './disposable'; | ||
*/ | ||
export declare type ValueChangeCallback<T> = (next: T) => void; | ||
export type ValueChangeCallback<T> = (next: T) => void; | ||
/** | ||
@@ -15,0 +15,0 @@ * Defines an ObservableValue value object. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
154472