Commit fb6b9636 authored by ChanHaeng Lee's avatar ChanHaeng Lee
Browse files

Remove `any`

parent 6e4b1564
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
/* eslint-disable @typescript-eslint/no-explicit-any */
declare global {
  var keyPairsStore: Map<string, Array<CryptoKeyPair>>;
  var relationStore: Map<string, string>;
}

export const keyPairsStore: Map<string, Array<CryptoKeyPair>> = (
  globalThis as any
).keyPairsStore ?? new Map();
export const relationStore: Map<string, string> =
  (globalThis as any).relationStore ?? new Map();
export const keyPairsStore: Map<string, Array<CryptoKeyPair>> =
  globalThis.keyPairsStore ?? new Map();
export const relationStore: Map<string, string> = globalThis.relationStore ??
  new Map();

// this is just a hack to demo nextjs
// never do this in production, use safe and secure storage
(globalThis as any).keyPairsStore = keyPairsStore;
(globalThis as any).relationStore = relationStore;
globalThis.keyPairsStore = keyPairsStore;
globalThis.relationStore = relationStore;