diff --git a/packages/upload-media/src/components/provider/with-registry-provider.tsx b/packages/upload-media/src/components/provider/with-registry-provider.tsx index df82c970ba0cb..9a47a5601d33e 100644 --- a/packages/upload-media/src/components/provider/with-registry-provider.tsx +++ b/packages/upload-media/src/components/provider/with-registry-provider.tsx @@ -3,8 +3,6 @@ */ import { useState } from '@wordpress/element'; import { useRegistry, createRegistry, RegistryProvider } from '@wordpress/data'; -// eslint-disable-next-line no-restricted-syntax -import type { WPDataRegistry } from '@wordpress/data/build-types/registry'; import { createHigherOrderComponent } from '@wordpress/compose'; /** @@ -13,6 +11,8 @@ import { createHigherOrderComponent } from '@wordpress/compose'; import { storeConfig } from '../../store'; import { STORE_NAME as mediaUploadStoreName } from '../../store/constants'; +type WPDataRegistry = ReturnType< typeof createRegistry >; + function getSubRegistry( subRegistries: WeakMap< WPDataRegistry, WPDataRegistry >, registry: WPDataRegistry,