{
  "version": 3,
  "sources": ["../src/dispatch.ts"],
  "sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { AnyConfig, StoreDescriptor, DispatchReturn } from './types';\nimport defaultRegistry from './default-registry';\n\n/**\n * Given a store descriptor, returns an object of the store's action creators.\n * Calling an action creator will cause it to be dispatched, updating the state value accordingly.\n *\n * Note: Action creators returned by the dispatch will return a promise when\n * they are called.\n *\n * Warning: This global `dispatch` function only works with the default registry.\n * It will not work with custom `RegistryProvider` or `BlockEditorProvider` contexts.\n * In React components, prefer the `useDispatch` hook instead, which is registry-aware.\n *\n * @param storeNameOrDescriptor The store descriptor. The legacy calling convention of passing\n *                              the store name is also supported.\n *\n * @example\n * ```js\n * import { dispatch } from '@wordpress/data';\n * import { store as myCustomStore } from 'my-custom-store';\n *\n * dispatch( myCustomStore ).setPrice( 'hammer', 9.75 );\n * ```\n * @return Object containing the action creators.\n */\nexport function dispatch<\n\tStoreNameOrDescriptor extends StoreDescriptor< AnyConfig > | string,\n>(\n\tstoreNameOrDescriptor: StoreNameOrDescriptor\n): DispatchReturn< StoreNameOrDescriptor > {\n\treturn defaultRegistry.dispatch(\n\t\tstoreNameOrDescriptor\n\t) as DispatchReturn< StoreNameOrDescriptor >;\n}\n"],
  "mappings": ";AAIA,OAAO,qBAAqB;AAyBrB,SAAS,SAGf,uBAC0C;AAC1C,SAAO,gBAAgB;AAAA,IACtB;AAAA,EACD;AACD;",
  "names": []
}
