Types

A type refers to a class of data and the operations permitted on that class of data. The following built-in types are supported for the XtronPro:

Basic (primitive) types

  • Number: an integer number (32-bit signed)
  • String: a sequence of characters
  • Boolean: true or false

Complex types

  • Array: a list of items of a primitive type

Functions

  • Function: code you can reuse anywhere in a program

Images and Sprites

  • Image: rows and columns of color pixels that make a picture
  • Sprite: an operation object to locate and move an image

User data

TypeScript allows you to create user-defined classes of data.

class Foo {
    public bar: number;
    baz() {

    }
}