#import "my-function.typ": *
`this-is-another-page.typ` also imports the `mydate`: #mydate.display()
main.typ
Here are a couple of examples, how to include functions. The first is used, when you have multiple packages with the same name, so you just rename them for the scope of this file (in this case main.typ).
The second one is a “filtered” import (I now have coined this term), which allows you to include only specific content of a file/package.
The third allows you to rename imported content!
The fourth includes all the content (so you don’t have to use my-function.mydate.display().
There is also #import "my-function.typ", which imports the module under the same name (hence you can insert your date with my-function.mydate.display())