signal-chain
Advanced tools
Comparing version 0.7.3 to 0.7.4
@@ -1,2 +0,2 @@ | ||
export type { FunctionVoid, Function0, Function1, Function2, Maybe, Executable, CleanupExec, ListenerDescription, PrimitiveSignal, PrimitiveReadonly, NextFn, Context, Chain, ConnectedChain } from './signal/types'; | ||
export * from './signal/types'; | ||
import { emit, select, stopIf, stop, passIf, passUnique, count } from './signal/tools'; | ||
@@ -3,0 +3,0 @@ import { key } from './signal/object'; |
@@ -0,1 +1,2 @@ | ||
export * from './signal/types'; | ||
import { emit, select, stopIf, stop, passIf, passUnique, count } from './signal/tools'; | ||
@@ -2,0 +3,0 @@ import { ifFn, ifNot } from './signal/if'; |
@@ -132,3 +132,8 @@ import { chain } from './chain'; | ||
listen, | ||
update, | ||
update: (...args) => { | ||
if (args.length > 0) { | ||
setValue(args[0]); | ||
} | ||
update(); | ||
}, | ||
disconnect, | ||
@@ -135,0 +140,0 @@ get value() { |
@@ -5,2 +5,6 @@ export type FunctionVoid = () => void; | ||
export type Function2<A, B, R = void> = (a: A, b: B) => R; | ||
export interface FunctionOptional1<A, R = void> { | ||
(): R; | ||
(a: A): R; | ||
} | ||
type Falsy = false | null | undefined | 0 | ''; | ||
@@ -16,3 +20,3 @@ export type Maybe<T> = T | null | undefined; | ||
listen: ConnectedChain<void, V>; | ||
update: FunctionVoid; | ||
update: FunctionOptional1<V>; | ||
value: V; | ||
@@ -19,0 +23,0 @@ disconnect: FunctionVoid; |
{ | ||
"name": "signal-chain", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"author": "Christoph Franke", | ||
@@ -5,0 +5,0 @@ "description": "Declarative Reactive Programming Library", |
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
250994
2119