Skip to content

Commit 0c501f6

Browse files
committed
[types] Correct schedule method
1 parent 8b01333 commit 0c501f6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/@types/persisters/docs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,8 @@
11691169
* in one call. This will also start to run the first task in the queue (which
11701170
* once complete will then run the next, and so on), and so this method itself
11711171
* is also asynchronous and returns a promise of the Persister.
1172+
* @param actions One or many functions which will be scheduled, and which can
1173+
* be asynchronous.
11721174
* @returns A reference to the Persister object.
11731175
* @example
11741176
* This example creates a custom Persister object against a newly-created

src/@types/persisters/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export interface Persister<Persist extends Persists = Persists.StoreOnly> {
156156
isAutoSaving(): boolean;
157157

158158
/// Persister.schedule
159-
schedule(...actions: Promise<any>[]): Promise<this>;
159+
schedule(...actions: (() => Promise<any>)[]): Promise<this>;
160160

161161
/// Persister.getStore
162162
getStore(): PersistedStore<Persist>;

src/@types/persisters/with-schemas/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export interface Persister<
175175
isAutoSaving(): boolean;
176176

177177
/// Persister.schedule
178-
schedule(...actions: Promise<any>[]): Promise<this>;
178+
schedule(...actions: (() => Promise<any>)[]): Promise<this>;
179179

180180
/// Persister.getStore
181181
getStore(): PersistedStore<Schemas, Persist>;

0 commit comments

Comments
 (0)