mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
26 lines
507 B
TypeScript
26 lines
507 B
TypeScript
//// [tests/cases/conformance/types/tuple/tupleLengthCheck.ts] ////
|
|
|
|
//// [tupleLengthCheck.ts]
|
|
declare const a: [number, string]
|
|
declare const rest: [number, string, ...boolean[]]
|
|
|
|
const a1 = a[1]
|
|
const a2 = a[2]
|
|
const a3 = a[1000]
|
|
|
|
const a4 = rest[1]
|
|
const a5 = rest[2]
|
|
const a6 = rest[3]
|
|
const a7 = rest[1000]
|
|
|
|
|
|
//// [tupleLengthCheck.js]
|
|
"use strict";
|
|
const a1 = a[1];
|
|
const a2 = a[2];
|
|
const a3 = a[1000];
|
|
const a4 = rest[1];
|
|
const a5 = rest[2];
|
|
const a6 = rest[3];
|
|
const a7 = rest[1000];
|