chartjs / chartjs/chartjs-plugin-annotation

Type error in label.d.ts

Open
#907 2 comments 0 reactions 0 assignees View on GitHub
types
Dominant language
JavaScript
Stars
623
Forks
377
PR merge metrics
No merged PRs in 30d

Description

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';
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.