Skip to content

Commit 64e9957

Browse files
committed
fix use undefined instead of void in jsdoc return types to satisfy require-returns-check
1 parent edb755c commit 64e9957

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

packages/block-editor/src/components/block-mover/mover-description.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const getMovementDirection = ( moveDirection, orientation ) => {
3232
* @param {string} orientation The orientation of the block movers, vertical or
3333
* horizontal.
3434
*
35-
* @return {string | void} Label for the block movement controls.
35+
* @return {string | undefined} Label for the block movement controls.
3636
*/
3737
export function getBlockMoverDescription(
3838
selectedCount,
@@ -227,7 +227,7 @@ export function getBlockMoverDescription(
227227
* @param {string} orientation The orientation of the block movers, vertical or
228228
* horizontal.
229229
*
230-
* @return {string | void} Label for the block movement controls.
230+
* @return {string | undefined} Label for the block movement controls.
231231
*/
232232
export function getMultiBlockMoverDescription(
233233
selectedCount,

packages/block-editor/src/components/block-switcher/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { __experimentalGetBlockAttributesNamesByRole as getBlockAttributesNamesB
1313
* @param {string} selectedBlockName The block's name to use for matching condition.
1414
* @param {Set} consumedBlocks A set holding the previously matched/consumed blocks.
1515
*
16-
* @return {WPBlock | void} The matched block if found or nothing(`undefined`).
16+
* @return {WPBlock | undefined} The matched block if found or nothing(`undefined`).
1717
*/
1818
export const getMatchingBlockByName = (
1919
block,

packages/block-editor/src/store/reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@ export function lastBlockAttributesChange( state = null, action ) {
17561756
* @param {?string} state Current state.
17571757
* @param {Object} action Dispatched action.
17581758
*
1759-
* @return {string | void} Updated state.
1759+
* @return {string | undefined} Updated state.
17601760
*/
17611761
export function automaticChangeStatus( state, action ) {
17621762
switch ( action.type ) {

packages/block-library/src/table/state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function createTable( { rowCount, columnCount } ) {
3030
*
3131
* @param {Object} state Current table state.
3232
*
33-
* @return {Object | void} The first table row.
33+
* @return {Object | undefined} The first table row.
3434
*/
3535
export function getFirstRow( state ) {
3636
if ( ! isEmptyTableSection( state.head ) ) {

packages/blocks/src/api/validation/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ export const isEqualTokensOfType = {
548548
*
549549
* @param {Object[]} tokens Set of tokens to search.
550550
*
551-
* @return {Object | void} Next non-whitespace token.
551+
* @return {Object | undefined} Next non-whitespace token.
552552
*/
553553
export function getNextNonWhitespaceToken( tokens ) {
554554
let token;

0 commit comments

Comments
 (0)