Loading examples/next-integration/data/store.ts +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; Loading
examples/next-integration/data/store.ts +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;