Skip to content

Commit

Permalink
add missing type-field parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lublak committed Nov 27, 2024
1 parent 37f3bf3 commit 252b4b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions typst-package/lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
}

#let call-function(ctxname, fnname, args, type-field: "$type") = {
cbor.decode(ctxjs.call_function(string-to-bytes(ctxname), string-to-bytes(fnname), cbor.encode(args)))
cbor.decode(ctxjs.call_function(string-to-bytes(ctxname), string-to-bytes(fnname), cbor.encode(args), string-to-bytes(type-field)))
}

#let define-vars(ctxname, vars, type-field: "$type") = {
cbor.decode(ctxjs.define_vars(string-to-bytes(ctxname), cbor.encode(vars)))
cbor.decode(ctxjs.define_vars(string-to-bytes(ctxname), cbor.encode(vars), string-to-bytes(type-field)))
}

#let eval-format(ctxname, js, args, type-field: "$type") = {
cbor.decode(ctxjs.eval_format(string-to-bytes(ctxname), string-to-bytes(js), cbor.encode(args)))
cbor.decode(ctxjs.eval_format(string-to-bytes(ctxname), string-to-bytes(js), cbor.encode(args), string-to-bytes(type-field)))
}

#let load-module-bytecode(ctxname, bytecode) = {
Expand All @@ -47,7 +47,7 @@
}

#let call-module-function(ctxname, modulename, fnname, args, type-field: "$type") = {
cbor.decode(ctxjs.call_module_function(string-to-bytes(ctxname), string-to-bytes(modulename), string-to-bytes(fnname), cbor.encode(args)))
cbor.decode(ctxjs.call_module_function(string-to-bytes(ctxname), string-to-bytes(modulename), string-to-bytes(fnname), cbor.encode(args), string-to-bytes(type-field)))
}

#let get-module-properties(ctxname, modulename) = {
Expand Down

0 comments on commit 252b4b0

Please sign in to comment.