TypeScriptSyntax
Tuple Type
Code example
const point: [number, number] = [1, 2];Types a fixed-length array.
In TypeScript, tuple type: types a fixed-length array — const point: [number, number] = [1, 2];
const point: [number, number] = [1, 2];const point: [number, number] = [1, 2];Types a fixed-length array.
Use const point: [number, number] = [1, 2];.
Use this pattern: const point: [number, number] = [1, 2];
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.