Skip to content

Commit 9cec3c0

Browse files
authored
Add deprecation warning on Signal blocking feature (#521)
* Add deprecation warning on `[I]Signal.block` Make `ISignal.block` optional * Add deprecation warning on `Signal.blockAll`
1 parent 56c165c commit 9cec3c0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/signaling/src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ export interface ISignal<T, U> {
3838
* ### Notes
3939
* The callback function must be synchronous.
4040
*
41+
* @deprecated This feature will be removed in Lumino 2.
42+
*
4143
* @param fn The callback during which the signal is blocked
4244
*/
43-
block(fn: () => void): void;
45+
block?(fn: () => void): void;
4446

4547
/**
4648
* Connect a slot to the signal.
@@ -154,6 +156,8 @@ export class Signal<T, U> implements ISignal<T, U> {
154156
* ### Notes
155157
* The callback function must be synchronous.
156158
*
159+
* @deprecated This feature will be removed in Lumino 2.
160+
*
157161
* @param fn The callback during which the signal is blocked
158162
*/
159163
block(fn: () => void): void {
@@ -223,6 +227,8 @@ export namespace Signal {
223227
* ### Notes
224228
* The callback function must be synchronous.
225229
*
230+
* @deprecated This feature will be removed in Lumino 2.
231+
*
226232
* @param sender The signals sender
227233
* @param fn The callback during which all signals are blocked
228234
*/

0 commit comments

Comments
 (0)