remove ERR_INVALID_ARG_TYPE_static

This commit is contained in:
Meghan Denny
2024-09-16 20:42:08 -07:00
parent 3d68a9483f
commit 208ffdfd7f
6 changed files with 8 additions and 56 deletions

View File

@@ -477,11 +477,7 @@ pub export fn Bun__Process__send(
return globalObject.throwValueRet(globalObject.ERR_MISSING_ARGS_static(ZigString.static("message"), null, null));
}
if (!message.isString() and !message.isObject() and !message.isNumber() and !message.isBoolean()) {
return globalObject.throwValueRet(globalObject.ERR_INVALID_ARG_TYPE_static(
ZigString.static("message"),
ZigString.static("string, object, number, or boolean"),
message,
));
return globalObject.throwInvalidArgumentTypeValue("message", "string, object, number, or boolean", message);
}
const good = ipc_instance.data.serializeAndSend(globalObject, message);