Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error in label.d.ts #907

Open
Fordiboii opened this issue Aug 21, 2023 · 2 comments
Open

Type error in label.d.ts #907

Fordiboii opened this issue Aug 21, 2023 · 2 comments
Labels
types Typescript type changes

Comments

@Fordiboii
Copy link

Hello folks,
Thanks for the nice plugin. Using chartjs-plugin-annotation: 2.2.1 and typescript: 3.9.10 I get the following type error:

ERROR in .../node_modules/chartjs-plugin-annotation/types/label.d.ts(5,25):
5:25 'number' only refers to a type, but is being used as a value here.
    3 | import { DrawTime, Scriptable, ShadowOptions } from './options';
    4 | 
  > 5 | type percentString = `${number}%`;
      |                         ^
    6 | export type LabelPosition = 'start' | 'center' | 'end' | percentString;
    7 | 
    8 | export type LabelTextAlign = 'left' | 'start' | 'center' | 'right' | 'end';
@stockiNail
Copy link
Collaborator

@Fordiboii thank you for your feedback. have a look to another issue (the same of this one): #563
The minim TS supported is 4.2

@stockiNail stockiNail reopened this Aug 21, 2023
@stockiNail stockiNail added the types Typescript type changes label Aug 21, 2023
@stockiNail
Copy link
Collaborator

Apologize, I closed for my fault. Anyway have a look to above comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Typescript type changes
Projects
None yet
Development

No branches or pull requests

2 participants