mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
19 lines
409 B
TypeScript
19 lines
409 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;
|