mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
wasi: use missing validator
The `wasi` lib module's `initialize()` method is missing a validator. PR-URL: https://github.com/nodejs/node/pull/39070 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
parent
ffda9a8953
commit
46a7e61900
4 changed files with 14 additions and 15 deletions
|
@ -229,6 +229,11 @@ const validateFunction = hideStackFrames((value, name) => {
|
|||
throw new ERR_INVALID_ARG_TYPE(name, 'Function', value);
|
||||
});
|
||||
|
||||
const validateUndefined = hideStackFrames((value, name) => {
|
||||
if (value !== undefined)
|
||||
throw new ERR_INVALID_ARG_TYPE(name, 'undefined', value);
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
isInt32,
|
||||
isUint32,
|
||||
|
@ -247,6 +252,7 @@ module.exports = {
|
|||
validateSignalName,
|
||||
validateString,
|
||||
validateUint32,
|
||||
validateUndefined,
|
||||
validateCallback,
|
||||
validateAbortSignal,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue