docs: replace @return with @returns (#6006)

The former is not understood by TSDoc.
This commit is contained in:
Jack Franklin
2020-06-12 11:38:24 +01:00
committed by GitHub
parent 23f18d8cc0
commit 8a099a0c2c
33 changed files with 98 additions and 88 deletions

View File

@@ -33,7 +33,7 @@ const GoldenComparators = {
* @param {?Object} actualBuffer
* @param {!Buffer} expectedBuffer
* @param {!string} mimeType
* @return {?{diff: (!Object:undefined), errorMessage: (string|undefined)}}
* @returns {?{diff: (!Object:undefined), errorMessage: (string|undefined)}}
*/
function compareImages(actualBuffer, expectedBuffer, mimeType) {
if (!actualBuffer || !(actualBuffer instanceof Buffer))
@@ -67,7 +67,7 @@ function compareImages(actualBuffer, expectedBuffer, mimeType) {
/**
* @param {?Object} actual
* @param {!Buffer} expectedBuffer
* @return {?{diff: (!Object:undefined), errorMessage: (string|undefined)}}
* @returns {?{diff: (!Object:undefined), errorMessage: (string|undefined)}}
*/
function compareText(actual, expectedBuffer) {
if (typeof actual !== 'string')
@@ -89,7 +89,7 @@ function compareText(actual, expectedBuffer) {
/**
* @param {?Object} actual
* @param {string} goldenName
* @return {!{pass: boolean, message: (undefined|string)}}
* @returns {!{pass: boolean, message: (undefined|string)}}
*/
function compare(goldenPath, outputPath, actual, goldenName) {
goldenPath = path.normalize(goldenPath);
@@ -149,7 +149,7 @@ function compare(goldenPath, outputPath, actual, goldenName) {
* @param {string} filePath
* @param {string} suffix
* @param {string=} customExtension
* @return {string}
* @returns {string}
*/
function addSuffix(filePath, suffix, customExtension) {
const dirname = path.dirname(filePath);