{"version":3,"file":"useReastorageValue.mjs","sources":["../src/useReastorageValue.ts"],"sourcesContent":["import { useSyncExternalStore } from \"use-sync-external-store/shim/index.js\";\nimport { ReastorageInterface } from \"./ReastorageInterface\";\n\nexport const useReastorageValue = <T>(storage: ReastorageInterface<T>) => {\n  return useSyncExternalStore(\n    storage.subscribe,\n    storage.get,\n    storage.getInitialValue\n  );\n};\n"],"names":["useReastorageValue","storage","useSyncExternalStore"],"mappings":"6EAGO,MAAMA,EAAyBC,GAC7BC,EACLD,EAAQ,UACRA,EAAQ,IACRA,EAAQ,eACV"}