Skip to content

Commit

Permalink
Fix TS types for editor package (#66754)
Browse files Browse the repository at this point in the history
Co-authored-by: manzoorwanijk <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
3 people authored Nov 6, 2024
1 parent 7ff7679 commit 5c6e6f3
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/data/data-core-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ Return true if the current post has already been published.
_Parameters_
- _state_ `Object`: Global application state.
- _currentPost_ `Object?`: Explicit current post for bypassing registry selector.
- _currentPost_ `[Object]`: Explicit current post for bypassing registry selector.
_Returns_
Expand Down
8 changes: 0 additions & 8 deletions packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1631,10 +1631,6 @@ _Related_

- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore>

_Type_

- `Object`

### storeConfig

Post editor data store configuration.
Expand All @@ -1643,10 +1639,6 @@ _Related_

- <https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore>

_Type_

- `Object`

### TableOfContents

Renders a table of contents component.
Expand Down
1 change: 1 addition & 0 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"module": "build-module/index.js",
"react-native": "src/index",
"wpScript": true,
"types": "build-types",
"sideEffects": [
"build-style/**",
"src/**/*.scss",
Expand Down
2 changes: 0 additions & 2 deletions packages/editor/src/store/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export const EDIT_MERGE_PROPERTIES = new Set( [ 'meta' ] );

/**
* Constant for the store module (or reducer) key.
*
* @type {string}
*/
export const STORE_NAME = 'core/editor';

Expand Down
4 changes: 0 additions & 4 deletions packages/editor/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import { unlock } from '../lock-unlock';
* Post editor data store configuration.
*
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore
*
* @type {Object}
*/
export const storeConfig = {
reducer,
Expand All @@ -31,8 +29,6 @@ export const storeConfig = {
* Store definition for the editor namespace.
*
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @type {Object}
*/
export const store = createReduxStore( STORE_NAME, {
...storeConfig,
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ export function isCurrentPostPending( state ) {
/**
* Return true if the current post has already been published.
*
* @param {Object} state Global application state.
* @param {Object?} currentPost Explicit current post for bypassing registry selector.
* @param {Object} state Global application state.
* @param {Object} [currentPost] Explicit current post for bypassing registry selector.
*
* @return {boolean} Whether the post has been published.
*/
Expand Down

0 comments on commit 5c6e6f3

Please sign in to comment.