@furystack/utils
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -62,3 +62,3 @@ import { Disposable } from './Disposable'; | ||
*/ | ||
getObservers(): ReadonlyArray<ValueObserver<T>>; | ||
getObservers(): readonly ValueObserver<T>[]; | ||
/** | ||
@@ -65,0 +65,0 @@ * @constructs The ObservableValue object |
@@ -88,3 +88,3 @@ "use strict"; | ||
getObservers() { | ||
return Array.from(this.observers); | ||
return [...this.observers]; | ||
} | ||
@@ -91,0 +91,0 @@ } |
{ | ||
"name": "@furystack/utils", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "General utilities", | ||
@@ -36,3 +36,3 @@ "main": "dist/index.js", | ||
"homepage": "https://github.com/furystack", | ||
"gitHead": "9d24fe1f853e12638735fb48f0ab0d05de329003" | ||
"gitHead": "53bee753133eb6538e44ef44e0e22a83e0c9a943" | ||
} |
@@ -46,3 +46,3 @@ import { Disposable } from './Disposable' | ||
*/ | ||
public subscribe(callback: ValueChangeCallback<T>, getLast = false): ValueObserver<T> { | ||
public subscribe(callback: ValueChangeCallback<T>, getLast = false) { | ||
const observer = new ValueObserver<T>(this, callback) | ||
@@ -61,3 +61,3 @@ this.observers.add(observer) | ||
*/ | ||
public unsubscribe(observer: ValueObserver<T>): boolean { | ||
public unsubscribe(observer: ValueObserver<T>) { | ||
return this.observers.delete(observer) | ||
@@ -91,4 +91,4 @@ } | ||
*/ | ||
public getObservers(): ReadonlyArray<ValueObserver<T>> { | ||
return Array.from(this.observers) | ||
public getObservers() { | ||
return [...this.observers] as ReadonlyArray<ValueObserver<T>> | ||
} | ||
@@ -95,0 +95,0 @@ |
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
140308