wa0x6e / cal-heatmap

Cal-Heatmap is a javascript charting library to create a time-series calendar heatmap
http://cal-heatmap.com
MIT License
2.73k stars 297 forks source link

Angular/Typescript typing issue #434

Closed ghost closed 11 months ago

ghost commented 11 months ago

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);
ghost commented 11 months ago

Already fixed https://github.com/wa0x6e/cal-heatmap/pull/392

ghost commented 11 months ago

@wa0x6e, Is there a new release planned soon?

wa0x6e commented 11 months ago

@jderuere 4.2.4 just released