@wordpress/hooks
Version:
WordPress hooks library.
17 lines • 547 B
TypeScript
/**
* Internal dependencies
*/
import type { Hooks, StoreKey } from './types';
/**
* Returns a function which, when invoked, will return the name of the
* currently running hook, or `null` if no hook of the given type is currently
* running.
*
* @param hooks Hooks instance.
* @param storeKey
*
* @return Function that returns the current hook name or null.
*/
declare function createCurrentHook(hooks: Hooks, storeKey: StoreKey): () => string | null;
export default createCurrentHook;
//# sourceMappingURL=createCurrentHook.d.ts.map