/* -------------------------------------------------------------------------- */
/*                         Local storage utility types                        */
/* -------------------------------------------------------------------------- */
export type LSSetter<T extends keyof LSKeys> = (key: T, value: LSKeys[T]) => void;
export type LSGetter<T extends keyof LSKeys> = (key: T) => LSKeys[T] | null;

export type LSKeys = {
  drawer: boolean;
}


export type LStorageHandlers<T extends keyof LSKeys> = {
  setter: {[P in T]: LSSetter<P>};
  getter: {[P in T]: LSGetter<P>};
}

export type LStorage<T extends keyof LSKeys> = {
  setItem(key: T, value: LSKeys[T]): void;  
  getItem(key: T): ReturnType<LSGetter<T>>;
}