Supported Types

Primitive types

NStack supports the following primitive types:

  • Integer
  • Double
  • Boolean
  • Text

More complex types can be built out of primitive ones:

  • Optional types: type1 optional
  • Tuples: (type1, type2, ...). A tuple must have at least two fields.
  • Structs: { name1: type1, name2: type2, ... }
  • Arrays: [type1]
  • Sums: Name1 type1a ... | Name2 type2a ... | ...

A user can define their own type in the idl_language.