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 micro:bit:
Basic (primitive) types
Complex types
- Array: a list of items of a primitive type
Functions
- Function: code you can reuse anywhere in a program
Buffer
- Buffer: temporary part of memory used to transfer data between your program and devices
User data
TypeScript allows you to create user-defined classes of data.
class Foo {
public bar: number;
baz() {
}
}