The correct function is include
, but you are setting the page
element.
This behaviour is not very well documented, but you can read at the page setup guide
A crucial difference to remember is that include
evaluates the file and returns content
, whereas import
will return a module
(from which you can select functions, etc.). See Scripting – Typst Documentation.