Fix typing for initBlock call in summary

This commit is contained in:
Matt Sherman 2023-09-26 21:16:52 -04:00
parent ac7ab2b1a0
commit c2e60a4aa8
1 changed files with 3 additions and 6 deletions

View File

@ -1,7 +1,6 @@
/**
* External dependencies
*/
import { BlockConfiguration } from '@wordpress/blocks';
import { registerWooBlockType } from '@woocommerce/block-templates';
/**
@ -9,10 +8,8 @@ import { registerWooBlockType } from '@woocommerce/block-templates';
*/
import blockConfiguration from './block.json';
import { Edit } from './edit';
import { SummaryAttributes } from './types';
const { name, ...metadata } =
blockConfiguration as BlockConfiguration< SummaryAttributes >;
const { name, ...metadata } = blockConfiguration;
export { name, metadata };
@ -22,9 +19,9 @@ export const settings = {
};
export function init() {
return registerWooBlockType< SummaryAttributes >( {
return registerWooBlockType( {
name,
metadata,
metadata: metadata as never,
settings,
} );
}