Permalink
Browse files

More JSDoc fixes

  • Loading branch information...
ntwb committed Jan 18, 2018
1 parent 596ff36 commit 968e87f36023fc62f8163b7c4a92b2bf8ee09986
@@ -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.
View
@@ -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 ) => {
@@ -19,7 +19,7 @@ const getGalleryDetailsMediaFrame = () => {
/**
* Create the default states.
*
* @returns {void} Void.
* @returns {void}
*/
createStates: function createStates() {
this.states.add( [
@@ -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 ) {
View
@@ -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 ) => {
View
@@ -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.
@@ -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.
@@ -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.
*/
View
@@ -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.
*/
@@ -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.

0 comments on commit 968e87f

Please sign in to comment.