mirror of
https://github.com/swc-project/swc.git
synced 2024-12-27 15:42:51 +03:00
b887b30092
**Description:** This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
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;
|