Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
declare module 'redux-persist' { | ||
declare type Action = Object | ||
declare type Dispatch = (a: Action) => any | ||
declare type Store = { | ||
dispatch: Dispatch, | ||
subscribe: (listener: () => void) => () => void, | ||
} | ||
declare type Storage = { | ||
setItem: Function, | ||
getItem: Function, | ||
removeItem: Function, | ||
getAllKeys: Function, | ||
} | ||
declare type Config = { | ||
blacklist?: Array<string>, | ||
whitelist?: Array<string>, | ||
storage?: Storage, | ||
transforms?: Array<Object>, | ||
debounce?: number, | ||
} | ||
declare type Purge = (keys: Array<string>) => void | ||
declare type Rehydrate = (incoming: Object, options: { serial: boolean }) => void | ||
declare type Persistor = { | ||
purge: Purge, | ||
rehydrate: Rehydrate, | ||
pause: () => void, | ||
resume: () => void, | ||
} | ||
declare type OnComplete = (err?: any, result?: Object) => void | ||
declare type PersistStore = (store: Store, config: Config, onComplete: OnComplete) => Persistor | ||
declare type GetStoredState = (config: Config, onComplete: OnComplete) => void | ||
declare type CreatePersistor = (store: Store, config: Config) => Persistor | ||
declare type StoreEnhancer = (next: Function) => Function | ||
declare type AutoRehydrate = Function | ||
declare class ReduxPersist { | ||
persistStore: PersistStore, | ||
autoRehydrate: AutoRehydrate, | ||
getStoredState: GetStoredState, | ||
createPersistor: CreatePersistor, | ||
} | ||
declare var exports: ReduxPersist; | ||
} |