Why does quarto render not propagate parameter?

I’m having trouble propagating parameters with quarto. If I update the yaml parameter, the file renders properly but if i call quarto_render with execute_params() it does not.

Here is my example:
test.qmd

---
title: "Title Text"
author: "Author Name"
format: 
    typst:
        output-file: test.pdf
        template-partials: 
            - typst/typst-show.typ
            - typst/typst-template.typ
params:
    test_parameter: yaml Parameter
---
Current parameter value: `r params$test_parameter`

typst-show.typ

#show: article.with(
$if(title)$
    title: "$title$",
$endif$        

$if(author)$
    author: "$author$",
$endif$

$if(params.test_parameter)$
    test_parameter: "$params.test_parameter$",
$endif$

)

typst-template.typ

#let article(
  title: "Default Title",
  author: "Default Author",
  paper: "a4",
  test_parameter: "Default Parameter",
  body
) = {
  set document(
    title: title,
    author: author
  )

  set page(
    paper: paper
  )

  // Render content
  heading(title)
  heading(author)
  text(test_parameter)

  body
}

render.R

library(quarto)

# Render the Quarto document with parameters
quarto::quarto_render(
  input = "drafts/test.qmd",
  execute_params = list(
    test_parameter = "quarto render parameter"
  )
)

Also, I observe that if I use inline-code to call parameters within body, it does not render properly. This may be due to typst but in case someone knows how to deal with that, I’d be happy as well.

Looks like you haven’t given it sufficient information to know to load R, so it just renders it as literal code, rather than evaluating it. One way to fix it is to indicate an engine in your yaml, like:

engine: knitr

Alternatively, if you had an R chunk, even if it isn’t rendered or evaluated, then Quarto knows to use knitr. So adding any R code would fix it, even if it’s this simple:

```{r}
#| echo: false
#| eval: false
1
```

And then, either way, you can also drop this:

$if(params.test_parameter)$
    test_parameter: "$params.test_parameter$",
$endif$