Hi !
I’m new to typst so I’m a little bit lost, especially when it comes about context and location.
I’m trying to get a global access to some immutable state through all my document.
I’m creating some state.typ
file with following code:
#let character = state("character", yaml("../builder/chars/Shrimp.yml"))
Then I’m trying to use it like so in another file of my document:
#import "../components/state.typ" : /* getCharacter */ character
#character.get()
But I get an error:
can only be used when context is known
Hint: try wrapping this in a `context` expression
I tried to make it work with context, but I think I’m just confused about how context work.