msyM
Convex Community11mo ago
1 reply
msy

Type instantiation is excessively deep and possibly infinite.

const current = new Date(now - i * dayInMs);
current.setUTCHours(0, 0, 0, 0);

const dayStart = current.getTime();
const dayEnd = dayStart + dayInMs;

const dayOfWeek = new Date(dayStart).getUTCDay();

const dailySum = await durationByUserAggregate.sum(ctx, {
namespace: [userId, true],
bounds: {
lower: { key: dayStart, inclusive: true },
upper: { key: dayEnd, inclusive: false },
},
});

trying to use aggregate and getting "Type instantiation is excessively deep and possibly infinite" for the bounds, I have no idea how to fix this.
Was this page helpful?