Skip to content

Commit

Permalink
Use ReturnType
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Surrell <[email protected]>
  • Loading branch information
swissspidy and sirreal authored Nov 5, 2024
1 parent 2b04bc0 commit 39764a6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand All @@ -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,
Expand Down

0 comments on commit 39764a6

Please sign in to comment.