Skip to content

Commit

Permalink
Clarify WPBlockSelection docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 22, 2019
1 parent 3e423f4 commit 0a6f065
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions packages/block-editor/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ export function resetBlocks( blocks ) {
}

/**
* @typedef {WPBlockSelection} A block selection object.
* A block selection object.
*
* @typedef {Object} WPBlockSelection
*
* @property {string} clientId A block client ID.
* @property {string} attributeKey A block attribute key.
* @property {number} offset A block attribute offset.
* @property {number} offset An attribute value offset, based on the rich
* text value. See `wp.richText.create`.
*/

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ import { SVG, Rect, G, Path } from '@wordpress/components';
*
* @property {string} clientId A block client ID.
* @property {string} attributeKey A block attribute key.
* @property {number} offset A block attribute offset.
* @property {number} offset An attribute value offset, based on the rich
* text value. See `wp.richText.create`.
*/

// Module constants
Expand Down
7 changes: 5 additions & 2 deletions packages/editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1193,11 +1193,14 @@ export function getEditorBlocks( state ) {
}

/**
* @typedef {WPBlockSelection} A block selection object.
* A block selection object.
*
* @typedef {Object} WPBlockSelection
*
* @property {string} clientId A block client ID.
* @property {string} attributeKey A block attribute key.
* @property {number} offset A block attribute offset.
* @property {number} offset An attribute value offset, based on the rich
* text value. See `wp.richText.create`.
*/

/**
Expand Down

0 comments on commit 0a6f065

Please sign in to comment.