Skip to content

Commit

Permalink
Use @returns instead of @return, see phetsims/chipper#557
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jan 8, 2019
1 parent d79f37e commit 5c93577
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions js/accessibility/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ define( function( require ) {
/**
* Get the inner content, the string that is the innerHTML or innerText for the node's primary sibling element.
*
* @return {string|null}
* @returns {string|null}
* @public
*/
getInnerContent: function() {
Expand Down Expand Up @@ -2214,7 +2214,7 @@ define( function( require ) {
* Get whether or not the accessible input is 'checked'.
*
* @public
* @return {boolean}
* @returns {boolean}
*/
getAccessibleChecked: function() {
return this._accessibleChecked;
Expand Down
4 changes: 2 additions & 2 deletions js/accessibility/AccessibilityTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ define( function( require ) {
* or if the node hasn't been attached to a display (and therefore has no accessible content).
*
* @param {Node} node
* @return {AccessiblePeer}
* @returns {AccessiblePeer}
*/
function getAccessiblePeerByNode( node ) {
if ( node.accessibleInstances.length === 0 ) {
Expand All @@ -72,7 +72,7 @@ define( function( require ) {
* the view (AccessiblePeer) is redrawn, which is quite often when setting options.
*
* @param {Node} node
* @return {HTMLElement}
* @returns {HTMLElement}
*/
function getPrimarySiblingElementByNode( node ) {

Expand Down
2 changes: 1 addition & 1 deletion js/accessibility/AccessibilityTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ define( function( require ) {
* accessibleOrder).
*
* @param {Node} node
* @return {Array.<PartialAccessibleTrail>}
* @returns {Array.<PartialAccessibleTrail>}
*/
findAccessibleTrails: function( node ) {
var trails = [];
Expand Down
6 changes: 3 additions & 3 deletions js/accessibility/AccessibilityUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ define( function( require ) {
* is only true for elements of the Parallel DOM.
*
* @param {HTMLElement} domElement
* @return {boolean}
* @returns {boolean}
*/
function isElementFocusable( domElement ) {

Expand All @@ -184,7 +184,7 @@ define( function( require ) {
* Trims the white space from the left of the string.
* Solution from https://stackoverflow.com/questions/1593859/left-trim-in-javascript
* @param {string} string
* @return {string}
* @returns {string}
*/
function trimLeft( string ) {

Expand Down Expand Up @@ -237,7 +237,7 @@ define( function( require ) {
* Return a random focusable element in the document. Particularly useful for fuzz testing.
* @public
*
* @return {HTMLElement}
* @returns {HTMLElement}
*/
getRandomFocusable: function() {

Expand Down
4 changes: 2 additions & 2 deletions js/accessibility/AccessibleInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ define( function( require ) {
* For debugging purposes.
* @public
*
* @return {string}
* @returns {string}
*/
toString: function() {
return this.id + '#{' + this.trail.toString() + '}';
Expand Down Expand Up @@ -599,7 +599,7 @@ define( function( require ) {
* @private
*
* @param {Node} rootNode
* @return {Object} - Type FakeAccessibleInstance: { node: {Node}, children: {Array.<FakeAccessibleInstance>} }
* @returns {Object} - Type FakeAccessibleInstance: { node: {Node}, children: {Array.<FakeAccessibleInstance>} }
*/
createFakeAccessibleTree: function( rootNode ) {
function createFakeTree( node ) {
Expand Down
2 changes: 1 addition & 1 deletion js/accessibility/AccessiblePeer.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ define( function( require ) {
* @public (scenery-internal)
*
* @param {string} elementName - see AccessibilityUtil for valid associations
* @return {HTMLElement}
* @returns {HTMLElement}
*/
getElementByName: function( elementName ) {
if ( elementName === AccessiblePeer.PRIMARY_SIBLING ) {
Expand Down
2 changes: 1 addition & 1 deletion js/accessibility/FocusHighlightFromNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ define( function( require ) {
* to the source node so that the FocusHighlightFromNode can update accordingly.
*
* @public (scenery-internal)
* @return {Trail}
* @returns {Trail}
*/
getUniqueHighlightTrail: function() {
assert && assert( this.sourceNode.instances.length <= 1, 'sourceNode cannot use DAG, must have single trail.' );
Expand Down
6 changes: 3 additions & 3 deletions js/accessibility/FocusHighlightPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ define( function( require ) {
* @static
*
* @param {Node} node
* @return {number}
* @returns {number}
*/
getInnerLineWidthFromNode: function( node ) {
return INNER_LINE_WIDTH_BASE / FocusHighlightPath.getWidthMagnitudeFromTransform( node );
Expand All @@ -258,7 +258,7 @@ define( function( require ) {
* @static
*
* @param {Node} node
* @return {number}
* @returns {number}
*/
getOuterLineWidthFromNode: function( node ) {
return OUTER_LINE_WIDTH_BASE / FocusHighlightPath.getWidthMagnitudeFromTransform( node );
Expand Down Expand Up @@ -304,7 +304,7 @@ define( function( require ) {
*
* @param {Node} node
*
* @return {number}
* @returns {number}
*/
getGroupDilationCoefficient: function( node ) {
var widthOfFocusHighlight = FocusHighlightPath.getOuterLineWidthFromNode( node );
Expand Down
4 changes: 2 additions & 2 deletions js/display/Display.js
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ define( function( require ) {
* Get the focus for Display. Null if nothing under a Display has focus.
* @public
*
* @return {Focus|null}
* @returns {Focus|null}
*/
get focus() {
return this.focusProperty.value;
Expand All @@ -1735,7 +1735,7 @@ define( function( require ) {
* Node has focus.
*
* @public
* @return {Node|null}
* @returns {Node|null}
*/
getFocusedNode: function() {
var focusedNode = null;
Expand Down
2 changes: 1 addition & 1 deletion js/listeners/DragListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ define( function( require ) {
* DragListener should not be clicked for a11y, this prevents that listener from being called.
* See https://github.com/phetsims/scenery/issues/903
* @public
* @return {boolean}
* @returns {boolean}
*/
canClick: function() {
return false;
Expand Down
2 changes: 1 addition & 1 deletion js/listeners/PressListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ define( function( require ) {
* we didn't want to use canClick in canPress because canClick could be overridden in subtypes.
* @public
*
* @return {boolean}
* @returns {boolean}
*/
canClick: function() {
// If this listener is already involved in pressing something (or our options predicate returns false) we can't
Expand Down
4 changes: 2 additions & 2 deletions js/util/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ define( function( require ) {
*
* @param color
* @param factor 0 (no change) to 1 (white)
* @return lighter (closer to white) version of the original color.
* @returns lighter (closer to white) version of the original color.
*/
colorUtilsBrighter: function( factor ) {
factor = this.checkFactor( factor );
Expand All @@ -471,7 +471,7 @@ define( function( require ) {
*
* @param color the original color
* @param factor 0 (no change) to 1 (black)
* @return darker (closer to black) version of the original color.
* @returns darker (closer to black) version of the original color.
*/
colorUtilsDarker: function( factor ) {
factor = this.checkFactor( factor );
Expand Down
2 changes: 1 addition & 1 deletion js/util/Trail.js
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ define( function( require ) {
*
* @param {Node} rootNode - the root of the trail being created
* @param {string} uniqueId - integers separated by ID_SEPARATOR, see getUniqueId
* @return {Trail}
* @returns {Trail}
*/
Trail.fromUniqueId = function( rootNode, uniqueId ) {
var trailIds = uniqueId.split( ID_SEPARATOR );
Expand Down

0 comments on commit 5c93577

Please sign in to comment.