The following code
const pts = [];
{
const pts = [];
pts.push(...[1,2,3]);
}
will be transformed into
var pts = [];
{
var pts$1 = [];
pts$1.push.apply(pts, [1,2,3]);
}
The first argument of apply is wrong. It should be pts$1.push.apply(pts$1, [1,2,3]);