Commit dd03016
authored
Updates to scale type definitions (#11419)
While adding some type definitions to chartjs-plugin-zoom
(see chartjs/chartjs-plugin-zoom#774), I noticed
a few limitations in Chart.js's scale types:
* The zoom plugin calls `Scale.parse` with no index parameter. Scale's
JSDoc allows this, but its TypeScript definitions did not.
* The zoom plugin alters scale options' min and max. The specific types
of these depend on which scale is in use, but every scale has them, so
`unknown` seems appropriate1 parent e7b8164 commit dd03016
2 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
1179 | 1195 | | |
1180 | 1196 | | |
1181 | 1197 | | |
| |||
1316 | 1332 | | |
1317 | 1333 | | |
1318 | 1334 | | |
1319 | | - | |
| 1335 | + | |
1320 | 1336 | | |
1321 | 1337 | | |
1322 | 1338 | | |
| |||
0 commit comments