Learning Center

Learning Center

Learn Menu

Annotations

Annotations provide a way to attach additional information to a statement.

Syntax

The syntax is the following: @name = value. Annotations must be placed above the statement you wish to annotate.

Multiple Annotations

There's no limit of how many annotations you can attach to a statement. Genesis supports two ways of chaining them together.

One annotation per line

  @index = true
@primaryKey = false
var username: string

Comma separated annotations

  @index = true, @primaryKey = false
var username: string

Mix of the two

  @index = true, @primaryKey = false
@name = "user_name"
var username: string

We use cookies to track activity using Google Analytics & reCAPTCHA. It helps us understand what our visitors like about our product and how they interact with our website. For more information, check out our Privacy Policy.