WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.53k stars 4.21k forks source link

@wordpress/editor component types are broken since the last update #67195

Open manzoorwanijk opened 21 hours ago

manzoorwanijk commented 21 hours ago

Description

Since the last update of @wordpress/editor - v14.12.0, the TS types for some components and some actions are broken.

Step-by-step reproduction instructions

Something here

See the TS error

![Image](https://github.com/user-attachments/assets/4dc4db16-a39f-4c94-98c3-bb9fcd7ffa00)

- Use `editPost` action

e.g.

```ts
import { dispatch } from '@wordpress/data';
import { store as editorStore } from '@wordpress/editor';

const { editPost } = dispatch( editorStore );

editPost( { title: 'Test' } );

See the error Expected 2 arguments, but got 1.ts(2554) Image

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Please confirm which theme type you used for testing.