declare global {
  interface Storage {
    get<T>(this: Storage, key: string): T;
    set(this: Storage, key: string, value: any): void;
  }
}

Storage.prototype.get = function <T>(this: Storage, key: string): T {
  return JSON.parse(this.getItem(key)) as T;
};

Storage.prototype.set = function (this: Storage, key: string, value: any): void {
  this.setItem(key, JSON.stringify(value));
};

export {};
