import { default as App , app } from './App' ; export default function useGlobalStorage < G extends Record < string , any > > ( passInApp ? ) { const realGlobal = passInApp || app ; return { get < T extends keyof G > ( key ) { return ( realGlobal . normalData as any ) [ key ] ; } , set < T extends keyof G > ( key , value ) { ( realGlobal . normalData as any ) [ key ] = value ; } , } ; }