Skip to content

Commit

Permalink
Use parameter name instead of terminusArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
ambiguousname committed Oct 29, 2024
1 parent f174945 commit 0014bcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tool/src/demo_gen/terminus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl<'ctx, 'tcx> RenderTerminusContext<'ctx, 'tcx> {
self.out_param_collision.insert(param_name, n);

let out_param = OutParam {
param_name: p,
param_name: p.clone(),
label,
type_name: type_name.clone(),
type_use,
Expand All @@ -261,7 +261,7 @@ impl<'ctx, 'tcx> RenderTerminusContext<'ctx, 'tcx> {

let param_info = ParamInfo {
// Grab arguments without having to name them
js: format!("terminusArgs[{}]", self.terminus_info.out_params.len() - 1),
js: p,
};

node.params.push(param_info);
Expand Down
1 change: 0 additions & 1 deletion tool/templates/demo_gen/terminus.js.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export function {{function_name}}(
{{param.param_name}}{% if typescript %}: {{param.type_name}}{% endif %}{% if !loop.last %}, {% endif %}
{%- endfor -%}
){% if typescript %};{% else %} {
var terminusArgs = arguments;
return {{node_call_stack|indent(4)}};
}
{%- endif %}

0 comments on commit 0014bcb

Please sign in to comment.