Skip to content

Commit

Permalink
lib: add missing assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Aug 17, 2022
1 parent 49db869 commit 500ed90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ const { signals } = internalBinding('constants').os;

/**
* @param {*} value
* @returns {boolean}
* @returns {value is number}
*/
function isInt32(value) {
return value === (value | 0);
}

/**
* @param {*} value
* @returns {boolean}
* @returns {value is number}
*/
function isUint32(value) {
return value === (value >>> 0);
Expand Down Expand Up @@ -291,6 +291,7 @@ function validateSignalName(signal, name = 'signal') {
* @callback validateBuffer
* @param {*} buffer
* @param {string} [name='buffer']
* @returns {asserts buffer is ArrayBufferView}
*/

/** @type {validateBuffer} */
Expand Down

0 comments on commit 500ed90

Please sign in to comment.