@@ -98,6 +98,15 @@ class ContextSeedUpKey<Src> extends ContextSeedKey<Src | EventKeeper<Src[]>, Aft
98
98
99
99
}
100
100
101
+ /**
102
+ * Updatable context value reference.
103
+ *
104
+ * @typeparam Value Context value type.
105
+ * @typeparam Src Source value type.
106
+ * @typeparam Seed Value seed type.
107
+ */
108
+ export type ContextUpRef < Value , Src , Seed = unknown > = ContextRef < Value , Src | EventKeeper < Src [ ] > , Seed > ;
109
+
101
110
/**
102
111
* Abstract implementation of updatable context value key.
103
112
*
@@ -108,7 +117,9 @@ class ContextSeedUpKey<Src> extends ContextSeedKey<Src | EventKeeper<Src[]>, Aft
108
117
* @typeparam Value Context value type.
109
118
* @typeparam Src Source value type.
110
119
*/
111
- export abstract class ContextUpKey < Value , Src > extends ContextKey < Value , Src | EventKeeper < Src [ ] > , AfterEvent < Src [ ] > > {
120
+ export abstract class ContextUpKey < Value , Src >
121
+ extends ContextKey < Value , Src | EventKeeper < Src [ ] > , AfterEvent < Src [ ] > >
122
+ implements ContextUpRef < Value , Src , AfterEvent < Src [ ] > > {
112
123
113
124
readonly seedKey : ContextSeedKey < Src | EventKeeper < Src [ ] > , AfterEvent < Src [ ] > > ;
114
125
@@ -131,8 +142,7 @@ export abstract class ContextUpKey<Value, Src> extends ContextKey<Value, Src | E
131
142
* @typeparam Value Context value type.
132
143
* @typeparam Seed Value seed type.
133
144
*/
134
- export type SingleContextUpRef < Value , Seed = unknown > =
135
- ContextRef < AfterEvent < [ Value ] > , Value | AfterEvent < Value [ ] > , Seed > ;
145
+ export type SingleContextUpRef < Value , Seed = unknown > = ContextUpRef < AfterEvent < [ Value ] > , Value , Seed > ;
136
146
137
147
/**
138
148
* Single updatable context value key.
@@ -211,8 +221,7 @@ export class SingleContextUpKey<Value>
211
221
* @typeparam Src Source value type.
212
222
* @typeparam Seed Value seed type.
213
223
*/
214
- export type MultiContextUpRef < Src , Seed = unknown > =
215
- ContextRef < AfterEvent < Src [ ] > , Src | AfterEvent < Src [ ] > , Seed > ;
224
+ export type MultiContextUpRef < Src , Seed = unknown > = ContextUpRef < AfterEvent < Src [ ] > , Src , Seed > ;
216
225
217
226
/**
218
227
* Multiple updatable context values key.
0 commit comments