/** * Shim mapping `@wordpress/data` to `window.wp.data` (adoption plan Phase * 0.5). Requires the `wp-data` script dependency on the consuming bundle. */ const pkg = (window as any).wp?.data ?? {}; export const { useSelect, useDispatch, useRegistry, withSelect, withDispatch, select, dispatch, subscribe, register, registerStore, createReduxStore, combineReducers, } = pkg; export default pkg;