Skip to content

Commit

Permalink
Fix TS types for the editor package (#67196)
Browse files Browse the repository at this point in the history
* Replace the wrong Component type with React Node/Element

* Replace the wrong Component type with React Node/Element

* Fix the optional params for store actions

* Replace the deprecated JSX.Element with React.ReactNode

* Update docs

* Fix children prop for multiple components
  • Loading branch information
manzoorwanijk authored Nov 25, 2024
1 parent 7e7ce3c commit 7e9e53d
Show file tree
Hide file tree
Showing 81 changed files with 260 additions and 256 deletions.
11 changes: 6 additions & 5 deletions docs/reference-guides/data/data-core-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,8 @@ Action that autosaves the current post. This includes server-side autosaving (de
_Parameters_
- _options_ `Object?`: Extra flags to identify the autosave.
- _options_ `[Object]`: Extra flags to identify the autosave.
- _options.local_ `[boolean]`: Whether to perform a local autosave.
### clearSelectedBlock
Expand Down Expand Up @@ -1204,7 +1205,7 @@ const getFeaturedMediaUrl = useSelect( ( select ) => {
_Parameters_
- _edits_ `Object`: Post attributes to edit.
- _options_ `Object`: Options for the edit.
- _options_ `[Object]`: Options for the edit.
_Returns_
Expand Down Expand Up @@ -1417,7 +1418,7 @@ Returns an action object used to signal that the blocks have been updated.
_Parameters_
- _blocks_ `Array`: Block Array.
- _options_ `?Object`: Optional options.
- _options_ `[Object]`: Optional options.
### resetPost
Expand All @@ -1431,7 +1432,7 @@ Action for saving the current post in the editor.
_Parameters_
- _options_ `Object`:
- _options_ `[Object]`:
### selectBlock
Expand Down Expand Up @@ -1519,7 +1520,7 @@ _Parameters_
- _post_ `Object`: Post object.
- _edits_ `Object`: Initial edited attributes object.
- _template_ `Array?`: Block Template.
- _template_ `[Array]`: Block Template.
### setupEditorState
Expand Down
Loading

1 comment on commit 7e9e53d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 7e9e53d.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12007772730
📝 Reported issues:

Please sign in to comment.