chartjs / chartjs-plugin-annotation

Annotation plugin for Chart.js
MIT License
607 stars 328 forks source link

Typescript compile error on 1.2.0 #563

Closed LouiMinister closed 2 years ago

LouiMinister commented 2 years ago

스크린샷 2021-12-15 오후 1 54 08

I used library on angular, but after 1.2.0 update, angular build failed. I think it's a bug on typescript compiling

kurkle commented 2 years ago

Typescript version in use?

LouiMinister commented 2 years ago

@kurkle Version 3.8.3

kurkle commented 2 years ago

@LouiMinister would you be able to update to 4.1+? (that would make it work)

If we decide that we are supporting typescript < 4.1, then there are couple of options.

  1. only use syntax acceptable by the lowest version of typescript we decide to support
  2. use typesVersions and split the types by typescript version.

I tried to implement the 2nd option, but found no easy way to do it DRY. It would essentially mean having 2 sets of types (and maintaining both).

@etimberg thoughts?

LouiMinister commented 2 years ago

@kurkle If you decide to support only typescript 4.1+ I think you have to update readme. I downgraded this library as a workaround. After you handling about typescript < 4.1, I will upgrade it. Thanks for your work.

etimberg commented 2 years ago

I am not opposed to older Typescript versions. Is there any way to get stats on which TS versions are in use and supported? I don't really want to support an older version that isn't used that much.