@@ -11,7 +11,7 @@ const offsetFromEdge = (scale, edge, offset) => edge === 'top' || edge === 'left
1111const getTicksLimit = ( ticksLength , maxTicksLimit ) => Math . min ( maxTicksLimit || ticksLength , ticksLength ) ;
1212
1313/**
14- * @typedef { import('./core.controller. js').default } Chart
14+ * @typedef { import('../types/index. js').Chart } Chart
1515 * @typedef {{value:number | string, label?:string, major?:boolean, $context?:any} } Tick
1616 */
1717
@@ -120,6 +120,7 @@ function createTickContext(parent, index, tick) {
120120}
121121
122122function titleAlign ( align , position , reverse ) {
123+ /** @type {CanvasTextAlign } */
123124 let ret = _toLeftRightCenter ( align ) ;
124125 if ( ( reverse && position !== 'right' ) || ( ! reverse && position === 'right' ) ) {
125126 ret = reverseAlign ( ret ) ;
@@ -839,7 +840,7 @@ export default class Scale extends Element {
839840 } else if ( isArray ( label ) ) {
840841 // if it is an array let's measure each element
841842 for ( j = 0 , jlen = label . length ; j < jlen ; ++ j ) {
842- nestedLabel = label [ j ] ;
843+ nestedLabel = /** @type { string } */ ( label [ j ] ) ;
843844 // Undefined labels and arrays should not be measured
844845 if ( ! isNullOrUndef ( nestedLabel ) && ! isArray ( nestedLabel ) ) {
845846 width = _measureText ( ctx , cache . data , cache . gc , width , nestedLabel ) ;
0 commit comments