mirror of
https://github.com/swc-project/swc.git
synced 2024-11-28 02:29:04 +03:00
19 lines
406 B
TypeScript
19 lines
406 B
TypeScript
var numStrTuple: [number, string];
|
|
var numNumTuple: [number, number];
|
|
var numEmptyObjTuple: [number, {}];
|
|
var emptyObjTuple: [{}];
|
|
|
|
var numArray: number[];
|
|
var emptyObjArray: {}[];
|
|
|
|
// no error
|
|
numArray = numNumTuple;
|
|
emptyObjArray = emptyObjTuple;
|
|
emptyObjArray = numStrTuple;
|
|
emptyObjArray = numNumTuple;
|
|
emptyObjArray = numEmptyObjTuple;
|
|
|
|
// error
|
|
numArray = numStrTuple;
|
|
emptyObjTuple = emptyObjArray;
|