wa0x6e/cal-heatmap

Angular/Typescript typing issue

jderuere opened this issue · 3 comments

I got these error when integrating with Angular

Error: node_modules/cal-heatmap/src/helpers/DateHelper.ts:210:5 - error TS2322: Type 'Dayjs | null' is not assignable to type 'Dayjs'.
  Type 'null' is not assignable to type 'Dayjs'.

210     end = dayjs.max(start, end);

Error: node_modules/cal-heatmap/src/helpers/DateHelper.ts:218:20 - error TS18047: 'pivot' is possibly 'null'.

218       result.push(+pivot);
                       ~~~~~


Error: node_modules/cal-heatmap/src/helpers/DateHelper.ts:219:15 - error TS18047: 'pivot' is possibly 'null'.

219       pivot = pivot.add(1, interval as ManipulateType);

Already fixed #392

@wa0x6e, Is there a new release planned soon?

wa0x6e commented

@jderuere 4.2.4 just released