vim-web 0.3.44-dev.66 → 0.3.44-dev.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* - useAsyncFuncRef: A reference for an asynchronous function.
|
|
14
14
|
* - useArgFuncRef: A reference for a function that accepts an argument and returns a value.
|
|
15
15
|
*/
|
|
16
|
+
import { ISimpleEvent } from "ste-simple-events";
|
|
16
17
|
/**
|
|
17
18
|
* Interface for a state reference.
|
|
18
19
|
* Provides methods to get, set, and confirm the current state.
|
|
@@ -31,6 +32,7 @@ export interface StateRef<T> {
|
|
|
31
32
|
* Confirms the current state (potentially applying a confirmation transformation).
|
|
32
33
|
*/
|
|
33
34
|
confirm(): void;
|
|
35
|
+
onChange: ISimpleEvent<T>;
|
|
34
36
|
}
|
|
35
37
|
export interface StateRefresher {
|
|
36
38
|
refresh: () => void;
|
|
@@ -49,7 +51,7 @@ export declare function useStateRef<T>(initialValue: T | (() => T)): {
|
|
|
49
51
|
*/
|
|
50
52
|
get(): T;
|
|
51
53
|
set: (value: T) => void;
|
|
52
|
-
onChange:
|
|
54
|
+
onChange: ISimpleEvent<T>;
|
|
53
55
|
/**
|
|
54
56
|
* Confirms the current state by applying the confirm function and updating the state.
|
|
55
57
|
*/
|