Skip to main content
Version: 1.6.0

Escaped variables

Keywords cannot be used as variables or record fields. If you need to use a keyword as a variable, you can prefix it with @, like so:

const @from = ("tz1fakefakefakefakefakefakefakcphLA5" as address)

Note that this convention, called escaped identifiers, conflicts with that of decorators, as found in JavaScript. Therefore, decorators are not considered valid escaped identifiers, e.g. @entry is invalid as a variable.