Position of Table caption in Quarto typst

Adding a label to the chunk with the table worked for me, the caption is now displayed before the table instead of after.
When you work with a template, another solution ( a student helped me with) is to place this code in the typst-template.typ:
show figure.where(kind: table): set figure.caption(position: top)