decord/source/modules/gateway/GatewayEncoding.tsx

72 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 12628
// Function ID: 97679
2026-07-20 16:05:17 +00:00
// Name: JSONEncoding
2026-07-27 11:26:19 +00:00
// Dependencies: [6, 7, 12629, 4678, 2]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 12628 (JSONEncoding)
2026-07-23 10:11:24 +00:00
import _classCallCheck from "_classCallCheck";
import _defineProperties from "_defineProperties";
import getErlpackEncoding from "getErlpackEncoding";
import { ProcessArgs } from "ProcessArgs";
getErlpackEncoding = getErlpackEncoding.getErlpackEncoding();
const tmp3 = (() => {
2026-07-20 16:05:17 +00:00
class JSONEncoding {
constructor() {
tmp = JSONEncoding(this, JSONEncoding);
return;
}
}
let obj = {
key: "pack",
value(arg0) {
return JSON.stringify(arg0);
}
};
const items = [obj, , , ];
obj = {
key: "unpack",
value(arg0) {
if ("string" !== typeof arg0) {
let _Error = Error;
let tmp4 = null;
if (null != arg0) {
tmp4 = tmp;
}
const _HermesInternal = HermesInternal;
const prototype = _Error.prototype;
_Error = new _Error("Expected a string to be passed to JSONEncoding.unpack, got " + tmp4);
throw _Error;
} else {
const _JSON = JSON;
return JSON.parse(arg0);
}
}
};
items[1] = obj;
obj = {
key: "getName",
value() {
return "json";
}
};
items[2] = obj;
items[3] = {
key: "wantsString",
value() {
return true;
}
};
return callback(JSONEncoding, items);
2026-07-23 10:11:24 +00:00
})();
2026-07-20 16:05:17 +00:00
let tmp4 = tmp3;
2026-07-23 10:11:24 +00:00
if (undefined !== getErlpackEncoding) {
tmp4 = getErlpackEncoding;
2026-07-20 16:05:17 +00:00
}
if (ProcessArgs.isDiscordGatewayPlaintextSet()) {
tmp4 = tmp3;
}
2026-07-23 10:11:24 +00:00
const result = require("getErlpackEncoding").fileFinishedImporting("modules/gateway/GatewayEncoding.tsx");
2026-07-20 16:05:17 +00:00
export default tmp4;