diff --git a/packages/edit-site/src/components/style-book/categories.ts b/packages/edit-site/src/components/style-book/categories.ts index 821ed418583e9c..b36c211eaa546c 100644 --- a/packages/edit-site/src/components/style-book/categories.ts +++ b/packages/edit-site/src/components/style-book/categories.ts @@ -1,7 +1,8 @@ /** * WordPress dependencies */ -// @ts-ignore +// @wordpress/blocks imports are not typed. +// @ts-expect-error import { getCategories } from '@wordpress/blocks'; /** @@ -30,11 +31,11 @@ export function getExamplesByCategory( if ( ! categoryDefinition?.slug || ! examples?.length ) { return; } - const categories: StyleBookCategory[] = + const categories: CategoryExamples[] = categoryDefinition?.subcategories ?? []; if ( categories.length ) { return categories.reduce( - ( acc, subcategoryDefinition ): CategoryExamples => { + ( acc, subcategoryDefinition ) => { const subcategoryExamples = getExamplesByCategory( subcategoryDefinition, examples diff --git a/packages/edit-site/src/components/style-book/color-examples.tsx b/packages/edit-site/src/components/style-book/color-examples.tsx index 1acc365fd25fbf..2f08697c69668e 100644 --- a/packages/edit-site/src/components/style-book/color-examples.tsx +++ b/packages/edit-site/src/components/style-book/color-examples.tsx @@ -9,11 +9,10 @@ import clsx from 'clsx'; import { __experimentalGrid as Grid } from '@wordpress/components'; import { View } from '@wordpress/primitives'; import { - // @ts-ignore getColorClassName, - // @ts-ignore __experimentalGetGradientClass, - // @ts-ignore + // @wordpress/block-editor imports are not typed. + // @ts-expect-error } from '@wordpress/block-editor'; /** diff --git a/packages/edit-site/src/components/style-book/examples.tsx b/packages/edit-site/src/components/style-book/examples.tsx index acc69c389742da..dde10d153fc377 100644 --- a/packages/edit-site/src/components/style-book/examples.tsx +++ b/packages/edit-site/src/components/style-book/examples.tsx @@ -3,15 +3,12 @@ */ import { __, sprintf } from '@wordpress/i18n'; import { - // @ts-ignore getBlockType, - // @ts-ignore getBlockTypes, - // @ts-ignore getBlockFromExample, - // @ts-ignore createBlock, - // @ts-ignore + // @wordpress/blocks imports are not typed. + // @ts-expect-error } from '@wordpress/blocks'; /**