File tree 3 files changed +16
-14
lines changed
3 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,6 @@ Signaali is currently [experimental](https://github.com/topics/metosin-experimen
16
16
17
17
## Unreleased
18
18
19
- ### Fixed
20
-
21
- - ` reset! ` and ` swap! ` on a ReactiveNode returns a value similar to when applied to an atom.
22
19
23
20
## 0.1.0
24
21
Original file line number Diff line number Diff line change 151
151
(propagation-filter-fn value new-value))
152
152
(set! value new-value)
153
153
(notify-signal-watchers this true ))
154
- value)
154
+ ; ; Value intentionally not returned.
155
+ #_value)
155
156
,]
156
157
157
158
:clj [IAtom
163
164
(.reset this (f value a b)))
164
165
(swap [this ^IFn f ^Object a ^Object b ^ISeq xs]
165
166
(.reset this (apply f value a b xs)))
166
- (^boolean compareAndSet [this ^Object old-value, ^Object new-value]
167
- (if (identical? value old-value)
168
- (do (.reset this new-value)
169
- true )
170
- false ))
167
+
168
+ ; ; Intentionally not included.
169
+ ; ;(^boolean compareAndSet [this ^Object old-value, ^Object new-value]
170
+ ; ; (if (identical? value old-value)
171
+ ; ; (do (.reset this new-value)
172
+ ; ; true)
173
+ ; ; false))
174
+
171
175
(reset [this ^Object new-value]
172
176
(when (or (nil? propagation-filter-fn)
173
177
(propagation-filter-fn value new-value))
174
178
(set! value new-value)
175
179
(notify-signal-watchers this true ))
176
- value)
180
+ ; ; Value intentionally not returned.
181
+ #_value)
177
182
,])
178
183
179
184
IDeref
Original file line number Diff line number Diff line change 13
13
(let [x (sr/create-signal 1 )]
14
14
(is (= 1 @x))
15
15
16
- ( let [a ( reset! x 5 )]
17
- ( is ( = a 5 )) )
16
+ ; ; reset! intentionally does not return a meaningful value
17
+ ( reset! x 5 )
18
18
(is (= 5 @x))
19
19
20
- ( let [a ( swap! x inc)]
21
- ( is ( = a 6 )) )
20
+ ; ; swap! intentionally does not return a meaningful value
21
+ ( swap! x inc )
22
22
(is (= 6 @x)))))
23
23
24
24
(deftest signal-test
You can’t perform that action at this time.
0 commit comments