From edaf1154d0c472c2591bbb6fc48cb85899ffddde Mon Sep 17 00:00:00 2001 From: Matt Sherman Date: Tue, 26 Sep 2023 21:15:31 -0400 Subject: [PATCH] Fix typing for initBlock call in sale-price --- .../product-editor/src/blocks/sale-price/index.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/js/product-editor/src/blocks/sale-price/index.ts b/packages/js/product-editor/src/blocks/sale-price/index.ts index d52482c6070..cd9e326744d 100644 --- a/packages/js/product-editor/src/blocks/sale-price/index.ts +++ b/packages/js/product-editor/src/blocks/sale-price/index.ts @@ -1,7 +1,6 @@ /** * External dependencies */ -import { BlockConfiguration } from '@wordpress/blocks'; import { registerWooBlockType } from '@woocommerce/block-templates'; /** @@ -9,20 +8,20 @@ import { registerWooBlockType } from '@woocommerce/block-templates'; */ import blockConfiguration from './block.json'; import { Edit } from './edit'; -import { SalePriceBlockAttributes } from './types'; -const { name, ...metadata } = - blockConfiguration as BlockConfiguration< SalePriceBlockAttributes >; +const { name, ...metadata } = blockConfiguration; export { metadata, name }; -export const settings: Partial< - BlockConfiguration< SalePriceBlockAttributes > -> = { +export const settings = { example: {}, edit: Edit, }; export function init() { - return registerWooBlockType( { name, metadata, settings } ); + return registerWooBlockType( { + name, + metadata: metadata as never, + settings, + } ); }