shelving 1.190.0 → 1.191.1
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.
- package/package.json +1 -1
- package/store/Store.d.ts +6 -2
- package/store/Store.js +4 -0
- package/store/index.d.ts +1 -0
- package/store/index.js +1 -0
package/package.json
CHANGED
package/store/Store.d.ts
CHANGED
|
@@ -106,20 +106,24 @@ export declare class Store<T, TT = T> implements AsyncIterable<T, void, void>, A
|
|
|
106
106
|
through(sequence: AsyncIterable<TT>): AsyncIterable<TT>;
|
|
107
107
|
/**
|
|
108
108
|
* Call a callback and save the returned value to this store.
|
|
109
|
+
* - If the callback returns an async value, it is awaited and values/errors will be saved.
|
|
109
110
|
*/
|
|
110
111
|
call<A extends Arguments>(callback: StoreCallback<TT, A>, ...args: A): Promise<boolean> | boolean;
|
|
111
112
|
/**
|
|
112
113
|
* Send the current value to a callback and save the returned value to this store.
|
|
114
|
+
* - If the callback returns an async value, it is awaited and values/errors will be saved.
|
|
113
115
|
*/
|
|
114
116
|
reduce<A extends Arguments>(reducer: StoreReducer<TT, T, A>, ...args: A): Promise<boolean> | boolean;
|
|
115
117
|
/**
|
|
116
118
|
* Run a callback and ignore any returned value.
|
|
119
|
+
* - If the callback returns an async value, it is awaited and errors will be saved.
|
|
117
120
|
*/
|
|
118
|
-
run<A extends Arguments>(callback: (...args: A) => void
|
|
121
|
+
run<A extends Arguments>(callback: (...args: A) => void, ...args: A): Promise<boolean> | boolean;
|
|
119
122
|
/**
|
|
120
123
|
* Send the current value to a callback and ignore any returned value.
|
|
124
|
+
* - If the callback returns an async value, it is awaited and errors will be saved.
|
|
121
125
|
*/
|
|
122
|
-
send<A extends Arguments>(callback: (value: T, ...args: A) => void
|
|
126
|
+
send<A extends Arguments>(callback: (value: T, ...args: A) => void, ...args: A): Promise<boolean> | boolean;
|
|
123
127
|
/**
|
|
124
128
|
* Await an async value and save it to this store.
|
|
125
129
|
* - Saves the resolved value.
|
package/store/Store.js
CHANGED
|
@@ -165,6 +165,7 @@ export class Store {
|
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
167
167
|
* Call a callback and save the returned value to this store.
|
|
168
|
+
* - If the callback returns an async value, it is awaited and values/errors will be saved.
|
|
168
169
|
*/
|
|
169
170
|
call(callback, ...args) {
|
|
170
171
|
try {
|
|
@@ -181,18 +182,21 @@ export class Store {
|
|
|
181
182
|
}
|
|
182
183
|
/**
|
|
183
184
|
* Send the current value to a callback and save the returned value to this store.
|
|
185
|
+
* - If the callback returns an async value, it is awaited and values/errors will be saved.
|
|
184
186
|
*/
|
|
185
187
|
reduce(reducer, ...args) {
|
|
186
188
|
return this.call(reducer, this.value, ...args);
|
|
187
189
|
}
|
|
188
190
|
/**
|
|
189
191
|
* Run a callback and ignore any returned value.
|
|
192
|
+
* - If the callback returns an async value, it is awaited and errors will be saved.
|
|
190
193
|
*/
|
|
191
194
|
run(callback, ...args) {
|
|
192
195
|
return this.call(_callSkipped, callback, ...args);
|
|
193
196
|
}
|
|
194
197
|
/**
|
|
195
198
|
* Send the current value to a callback and ignore any returned value.
|
|
199
|
+
* - If the callback returns an async value, it is awaited and errors will be saved.
|
|
196
200
|
*/
|
|
197
201
|
send(callback, ...args) {
|
|
198
202
|
return this.call(_callSkipped, callback, this.value, ...args);
|
package/store/index.d.ts
CHANGED