Skip to content

Commit 500ed90

Browse files
committed
lib: add missing assertions
1 parent 49db869 commit 500ed90

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/validators.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ const { signals } = internalBinding('constants').os;
3636

3737
/**
3838
* @param {*} value
39-
* @returns {boolean}
39+
* @returns {value is number}
4040
*/
4141
function isInt32(value) {
4242
return value === (value | 0);
4343
}
4444

4545
/**
4646
* @param {*} value
47-
* @returns {boolean}
47+
* @returns {value is number}
4848
*/
4949
function isUint32(value) {
5050
return value === (value >>> 0);
@@ -291,6 +291,7 @@ function validateSignalName(signal, name = 'signal') {
291291
* @callback validateBuffer
292292
* @param {*} buffer
293293
* @param {string} [name='buffer']
294+
* @returns {asserts buffer is ArrayBufferView}
294295
*/
295296

296297
/** @type {validateBuffer} */

0 commit comments

Comments
 (0)