2026-07-29 08:29:29 +00:00
|
|
|
// Module ID: 1316
|
|
|
|
|
// Function ID: 1317
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: assert
|
|
|
|
|
// Dependencies: []
|
|
|
|
|
|
2026-07-29 08:29:29 +00:00
|
|
|
// Module 1316 (assert)
|
2026-07-20 16:05:17 +00:00
|
|
|
arg5.assert = undefined;
|
|
|
|
|
arg5.assertNever = undefined;
|
|
|
|
|
arg5.assertInt32 = undefined;
|
|
|
|
|
arg5.assertUInt32 = undefined;
|
|
|
|
|
arg5.assertFloat32 = undefined;
|
|
|
|
|
arg5.assert = function assert(arg0, arg1) {
|
|
|
|
|
if (!arg0) {
|
|
|
|
|
const _Error = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error(arg1);
|
2026-07-20 16:05:17 +00:00
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg5.assertNever = function assertNever(arg0, arg1) {
|
|
|
|
|
let text = arg1;
|
|
|
|
|
if (null == arg1) {
|
|
|
|
|
text = `Unexpected object: ${arg0}`;
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error(text);
|
2026-07-20 16:05:17 +00:00
|
|
|
throw error;
|
|
|
|
|
};
|
|
|
|
|
arg5.assertInt32 = function assertInt32(NumberResult) {
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof NumberResult !== "number") {
|
2026-07-20 16:05:17 +00:00
|
|
|
const _Error2 = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("invalid int 32: " + typeof NumberResult);
|
2026-07-20 16:05:17 +00:00
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
const _Number = Number;
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error1 = new Error("invalid int 32: " + NumberResult);
|
|
|
|
|
throw error1;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg5.assertUInt32 = function assertUInt32(NumberResult) {
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof NumberResult !== "number") {
|
2026-07-20 16:05:17 +00:00
|
|
|
const _Error2 = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("invalid uint 32: " + typeof NumberResult);
|
2026-07-20 16:05:17 +00:00
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
const _Number = Number;
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error1 = new Error("invalid uint 32: " + NumberResult);
|
|
|
|
|
throw error1;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
arg5.assertFloat32 = function assertFloat32(NumberResult) {
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof NumberResult !== "number") {
|
2026-07-20 16:05:17 +00:00
|
|
|
const _Error2 = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("invalid float 32: " + typeof NumberResult);
|
2026-07-20 16:05:17 +00:00
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
const _Number = Number;
|
|
|
|
|
if (Number.isFinite(NumberResult)) {
|
|
|
|
|
const _Error = Error;
|
|
|
|
|
const error1 = new Error("invalid float 32: " + NumberResult);
|
|
|
|
|
throw error1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|