export type UsePersistedState = [T, (value: T | ((previousState: T) => T)) => void | Promise] export type PersistedState = (key: string, initialValue: T) => UsePersistedState