diff --git a/hooks/use-is-supported-taxonomy/index.js b/hooks/use-is-supported-taxonomy/index.ts similarity index 77% rename from hooks/use-is-supported-taxonomy/index.js rename to hooks/use-is-supported-taxonomy/index.ts index c954909d..2a9ca0e6 100644 --- a/hooks/use-is-supported-taxonomy/index.js +++ b/hooks/use-is-supported-taxonomy/index.ts @@ -1,7 +1,7 @@ import { useSelect } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; -export const useIsSupportedTaxonomy = (postType, taxonomyName) => { +export const useIsSupportedTaxonomy = (postType: string, taxonomyName: string) => { return useSelect( (select) => { const postTypeObject = select(coreStore).getPostType(postType); @@ -16,5 +16,5 @@ export const useIsSupportedTaxonomy = (postType, taxonomyName) => { return [!!isSupportedTaxonomy, hasResolvedPostType]; }, [postType, taxonomyName], - ); + ) as [isSupportedTaxonomy: boolean, hasResolvedPostType: boolean]; };