TurboScript
TurboScript copied to clipboard
User wants int32[] as well as Array<int32>
How
let arr1: int32[] = new Array<int32>(1);
let arr2: int32[] = new int32[](2); // if possible and make sense
let arr3: int32[] = new Array(3); // implicitly type detection
Sorry, posted here but then noticed that it's the wrong repo ^^
😄 btw @dcodeIO is Array type implemented in AssemblyScript
@MaxGraey I would simplify
let arr2: int32[] = new int32[](2);
to
let arr2: int32[] = [](2);
I think new
keyword should be exists.
let arr2: int32[] = new [](2);
The best solution in my opinion (shortest and compatible):
let arr2 = new int32[](2);