How can I extract source code examples from a typ file?

Thank you @eike !
I don’t know why I thought that Typst produced some kind of intermediate file that could be read.
Your comments helped me further.