// Memory type is a special global pre-defined type
const memory: Memory<{ initial: 1 }>;

// An object of Memory type must be defined(can be imported)
// to enable memory operations

export function test(): i32 {
  // To use arrays simple define a type with array subscript
  const arr: i32[] = 0;
  // If arr is not defined with i32[] the below line would throw a SyntaxError
  arr[0] = 20;
  arr[1] = 15;

  // This should return 35
  return arr[0] + arr[1];
}

