Comparing version
@@ -13,2 +13,3 @@ export { hasFluidValue, getFluidValue, getFluidConfig, setFluidConfig, addFluidObserver, }; | ||
/** Add an observer to a fluid object. Returns an unsubscribe function if the target is a fluid object, otherwise undefined. */ | ||
declare function addFluidObserver<E extends FluidEvent>(target: FluidValue<any, E>, observer: FluidObserver<E>): () => void; | ||
declare function addFluidObserver(target: object, observer: FluidObserver): (() => void) | undefined; | ||
@@ -15,0 +16,0 @@ export interface ChangeEvent<T = any> { |
@@ -25,3 +25,2 @@ "use strict"; | ||
exports.setFluidConfig = setFluidConfig; | ||
/** Add an observer to a fluid object. Returns an unsubscribe function if the target is a fluid object, otherwise undefined. */ | ||
function addFluidObserver(target, observer) { | ||
@@ -28,0 +27,0 @@ var config = getFluidConfig(target); |
@@ -13,2 +13,3 @@ export { hasFluidValue, getFluidValue, getFluidConfig, setFluidConfig, addFluidObserver, }; | ||
/** Add an observer to a fluid object. Returns an unsubscribe function if the target is a fluid object, otherwise undefined. */ | ||
declare function addFluidObserver<E extends FluidEvent>(target: FluidValue<any, E>, observer: FluidObserver<E>): () => void; | ||
declare function addFluidObserver(target: object, observer: FluidObserver): (() => void) | undefined; | ||
@@ -15,0 +16,0 @@ export interface ChangeEvent<T = any> { |
@@ -20,3 +20,2 @@ var $config = Symbol.for('FluidValue:config'); | ||
} | ||
/** Add an observer to a fluid object. Returns an unsubscribe function if the target is a fluid object, otherwise undefined. */ | ||
function addFluidObserver(target, observer) { | ||
@@ -23,0 +22,0 @@ var config = getFluidConfig(target); |
{ | ||
"name": "fluids", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Glue layer for reactivity", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index", |
@@ -42,2 +42,12 @@ const $config = Symbol.for('FluidValue:config') | ||
/** Add an observer to a fluid object. Returns an unsubscribe function if the target is a fluid object, otherwise undefined. */ | ||
function addFluidObserver<E extends FluidEvent>( | ||
target: FluidValue<any, E>, | ||
observer: FluidObserver<E> | ||
): () => void | ||
function addFluidObserver( | ||
target: object, | ||
observer: FluidObserver | ||
): (() => void) | undefined | ||
function addFluidObserver(target: object, observer: FluidObserver) { | ||
@@ -44,0 +54,0 @@ const config = getFluidConfig(target) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18797
1.03%300
2.74%0
-100%