@@ -11,7 +11,7 @@ const offsetFromEdge = (scale, edge, offset) => edge === 'top' || edge === 'left
11
11
const getTicksLimit = ( ticksLength , maxTicksLimit ) => Math . min ( maxTicksLimit || ticksLength , ticksLength ) ;
12
12
13
13
/**
14
- * @typedef { import('./core.controller. js').default } Chart
14
+ * @typedef { import('../types/index. js').Chart } Chart
15
15
* @typedef {{value:number | string, label?:string, major?:boolean, $context?:any} } Tick
16
16
*/
17
17
@@ -120,6 +120,7 @@ function createTickContext(parent, index, tick) {
120
120
}
121
121
122
122
function titleAlign ( align , position , reverse ) {
123
+ /** @type {CanvasTextAlign } */
123
124
let ret = _toLeftRightCenter ( align ) ;
124
125
if ( ( reverse && position !== 'right' ) || ( ! reverse && position === 'right' ) ) {
125
126
ret = reverseAlign ( ret ) ;
@@ -839,7 +840,7 @@ export default class Scale extends Element {
839
840
} else if ( isArray ( label ) ) {
840
841
// if it is an array let's measure each element
841
842
for ( j = 0 , jlen = label . length ; j < jlen ; ++ j ) {
842
- nestedLabel = label [ j ] ;
843
+ nestedLabel = /** @type { string } */ ( label [ j ] ) ;
843
844
// Undefined labels and arrays should not be measured
844
845
if ( ! isNullOrUndef ( nestedLabel ) && ! isArray ( nestedLabel ) ) {
845
846
width = _measureText ( ctx , cache . data , cache . gc , width , nestedLabel ) ;
0 commit comments