- Docs (JSDoc): Further on preferring void

This commit is contained in:
Brett Zamir
2019-04-16 08:59:16 +08:00
parent 894fed3e80
commit d84f39cb3f
62 changed files with 576 additions and 575 deletions

View File

@@ -5,7 +5,7 @@ const NEAR_ZERO = 5e-6; // 0.000005, Firefox fails at higher levels of precision
* @param {Float} actual
* @param {Float} expected
* @param {string} message
* @returns {undefined}
* @returns {void}
*/
function almostEquals (actual, expected, message) {
message = message || (actual + ' did not equal ' + expected);

View File

@@ -8,7 +8,7 @@
* @param {Float} expected
* @param {Float} maxDifference (the maximum inclusive difference allowed between the actual and expected numbers)
* @param {string} [message] Defaults to structured message
* @returns {undefined}
* @returns {void}
*/
function close (actual, expected, maxDifference, message) {
const actualDiff = (actual === expected) ? 0 : Math.abs(actual - expected),
@@ -27,7 +27,7 @@ function close (actual, expected, maxDifference, message) {
* @param {Float} expected
* @param {Float} maxPercentDifference (the maximum inclusive difference percentage allowed between the actual and expected numbers)
* @param {string} [message] Defaults to a structured message
* @returns {undefined}
* @returns {void}
*/
function closePercent (actual, expected, maxPercentDifference, message) {
let actualDiff, result;
@@ -57,7 +57,7 @@ function closePercent (actual, expected, maxPercentDifference, message) {
* @param {Float} expected
* @param {Float} minDifference (the minimum exclusive difference allowed between the actual and expected numbers)
* @param {string} [message] Defaults to structured message
* @returns {undefined}
* @returns {void}
*/
function notClose (actual, expected, minDifference, message) {
const actualDiff = Math.abs(actual - expected),
@@ -76,7 +76,7 @@ function notClose (actual, expected, minDifference, message) {
* @param {Float} expected
* @param {Float} minPercentDifference (the minimum exclusive difference percentage allowed between the actual and expected numbers)
* @param {string} [message] Defaults to a structured message
* @returns {undefined}
* @returns {void}
*/
function notClosePercent (actual, expected, minPercentDifference, message) {
let actualDiff, result;

View File

@@ -3,7 +3,7 @@
* @param {GenericObject} obj
* @param {GenericCallback} fn
* @param {Any} arg1
* @returns {undefined}
* @returns {void}
*/
function expectOutOfBoundsException (obj, fn, arg1) {
const expected = true;