Skip to content

Commit

Permalink
More JSDoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ntwb committed Jan 18, 2018
1 parent 596ff36 commit 968e87f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion blocks/api/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export function getBlockTypes() {
/**
* Returns true if the block defines support for a feature, or false otherwise.
*
* @param {(String|Object)} nameOrType Block name or type object.
* @param {(string|Object)} nameOrType Block name or type object.
* @param {string} feature Feature to test.
* @param {boolean} defaultSupports Whether feature is supported by
* default if not explicitly defined.
Expand Down
6 changes: 3 additions & 3 deletions blocks/api/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ export function getSaveContent( blockType, attributes ) {
* This function returns only those attributes which are needed to persist and
* which cannot be matched from the block content.
*
* @param {Object<String,*>} allAttributes Attributes from in-memory block data.
* @param {Object<String,*>} blockType Block type.
* @param {Object<string,*>} allAttributes Attributes from in-memory block data.
* @param {Object<string,*>} blockType Block type.
*
* @returns {Object<String,*>} Subset of attributes for comment serialization.
* @returns {Object<string,*>} Subset of attributes for comment serialization.
*/
export function getCommentAttributes( allAttributes, blockType ) {
const attributes = reduce( blockType.attributes, ( result, attributeSchema, key ) => {
Expand Down
2 changes: 1 addition & 1 deletion blocks/media-upload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const getGalleryDetailsMediaFrame = () => {
/**
* Create the default states.
*
* @returns {void} Void.
* @returns {void}
*/
createStates: function createStates() {
this.states.add( [
Expand Down
2 changes: 1 addition & 1 deletion components/autocomplete/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function par( /* arguments */ ) {
* @param {*} wrapper Enzyme wrapper around react node
* containing a FakeEditor.
* @param {Array.<Node>} nodeList Array of dom nodes.
* @param {Array.<Number>} cursorPosition Array specifying the child indexes and
* @param {Array.<number>} cursorPosition Array specifying the child indexes and
* offset of the cursor.
*/
function simulateInput( wrapper, nodeList, cursorPosition ) {
Expand Down
2 changes: 1 addition & 1 deletion data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function registerSelectors( reducerKey, newSelectors ) {
* to determine the data for the
* component.
*
* @returns {Func} Renders the wrapped component and passes it data.
* @returns {Function} Renders the wrapped component and passes it data.
*/
export const query = ( mapSelectorsToProps ) => ( WrappedComponent ) => {
const connectWithStore = ( ...args ) => {
Expand Down
6 changes: 3 additions & 3 deletions editor/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function toggleSelection( isSelectionEnabled = true ) {
* Returns an action object signalling that a blocks should be replaced with
* one or more replacement blocks.
*
* @param {(String|String[])} uids Block UID(s) to replace.
* @param {(string|string[])} uids Block UID(s) to replace.
* @param {(Object|Object[])} blocks Replacement block(s).
*
* @returns {Object} Action object.
Expand All @@ -178,7 +178,7 @@ export function replaceBlocks( uids, blocks ) {
* Returns an action object signalling that a single block should be replaced
* with one or more replacement blocks.
*
* @param {(String|String[])} uid Block UID(s) to replace.
* @param {(string|string[])} uid Block UID(s) to replace.
* @param {(Object|Object[])} block Replacement block(s).
*
* @returns {Object} Action object.
Expand Down Expand Up @@ -351,7 +351,7 @@ export function stopTyping() {
*
* @param {string} sidebar Name of the sidebar to toggle
* (desktop, mobile or publish).
* @param {Boolean?} forcedValue Force a sidebar state.
* @param {boolean?} forcedValue Force a sidebar state.
*
* @returns {Object} Action object.
*/
Expand Down
8 changes: 4 additions & 4 deletions editor/utils/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ export function placeCaretAtHorizontalEdge( container, isReverse ) {
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/caretRangeFromPoint
*
* @param {Document} doc The document of the range.
* @param {Float} x Horizontal position within the current viewport.
* @param {Float} y Vertical position within the current viewport.
* @param {number} x Horizontal position within the current viewport.
* @param {number} y Vertical position within the current viewport.
*
* @returns {?Range} The best range for the given point.
*/
Expand Down Expand Up @@ -230,8 +230,8 @@ function caretRangeFromPoint( doc, x, y ) {
* This is preferred over getting the UI nodes and set styles there.
*
* @param {Document} doc The document of the range.
* @param {Float} x Horizontal position within the current viewport.
* @param {Float} y Vertical position within the current viewport.
* @param {number} x Horizontal position within the current viewport.
* @param {number} y Vertical position within the current viewport.
* @param {Element} container Container in which the range is expected to be found.
*
* @returns {?Range} The best range for the given point.
Expand Down

0 comments on commit 968e87f

Please sign in to comment.