import checkSetupEnv from './checkSetupEnv' ; import getAppStore from './getAppStore' ; deprecated export default function useGlobalData < G extends Record < string , any > > ( ) { checkSetupEnv ( 'useGlobalData' , [ 'app' , 'page' , 'component' ] ) ; const app = getAppStore ( ) ; return { get < T extends keyof G > ( key ) { return ( app as any ) . $$compositionState [ key ] as G [ T ] ; } , set < T extends keyof G > ( key , value ) { ( app as any ) . $$compositionState [ key ] = value ; } , } ; }