Type instantiation is excessively deep and possibly infinite.
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.
