Add alias flag for allowing bytes

This commit is contained in:
Fabian Stamm
2022-04-12 20:56:46 +00:00
parent 97ce0ea9b5
commit 339d3006d6
5 changed files with 127 additions and 46 deletions

View File

@ -10046,7 +10046,7 @@ function get_ir(parsed) {
]);
} else if (statement.type == "define") {
options[statement.key] = statement.value;
if (statement.key == "use_messagepack" && statement.value == "true") {
if ((statement.key == "use_messagepack" || statement.key == "allow_bytes") && statement.value == "true") {
builtin.push("bytes");
}
} else {
@ -10260,7 +10260,6 @@ var TypescriptTarget = class extends CompileTarget {
const params = fnc.inputs.map((e) => `${e.name}: ${toJSType(e.type) + (e.array ? "[]" : "")}`).join(", ");
if (!fnc.return) {
a(1, `${fnc.name}(${params}): void {`);
1;
a(2, `this._provider.sendMessage({`);
a(3, `jsonrpc: "2.0",`);
a(3, `method: "${def.name}.${fnc.name}",`);