Skip to content

Commit

Permalink
fix: return type of persist migrate function changed to PersistedState
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Deprez committed Feb 26, 2024
1 parent 3c6dc2d commit ffc578d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/middleware/persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ export interface PersistOptions<S, PersistedState = S> {
* A function to perform persisted state migration.
* This function will be called when persisted state versions mismatch with the one specified here.
*/
migrate?: (persistedState: unknown, version: number) => S | Promise<S>
migrate?: (
persistedState: unknown,
version: number,
) => PersistedState | Promise<PersistedState>
/**
* A function to perform custom hydration merges when combining the stored state with the current one.
* By default, this function does a shallow merge.
Expand Down

0 comments on commit ffc578d

Please sign in to comment.