@@ -5,6 +5,12 @@ import Animations from './core.animations';
55
66const resolve = helpers . options . resolve ;
77
8+ /**
9+ * @typedef { import("../core/core.controller").default } Chart
10+ * @typedef { import("../core/core.element").default } Element
11+ * @typedef {{ target: object, options: object } } SharedOptions
12+ */
13+
814const arrayEvents = [ 'push' , 'pop' , 'shift' , 'splice' , 'unshift' ] ;
915
1016/**
@@ -217,6 +223,10 @@ function getFirstScaleId(chart, axis) {
217223
218224class DatasetController {
219225
226+ /**
227+ * @param {Chart } chart
228+ * @param {number } datasetIndex
229+ */
220230 constructor ( chart , datasetIndex ) {
221231 this . chart = chart ;
222232 this . _ctx = chart . ctx ;
@@ -953,6 +963,10 @@ class DatasetController {
953963
954964 /**
955965 * Utility for checking if the options are shared and should be animated separately.
966+ * @param {string } mode
967+ * @param {Element } el
968+ * @param {{ $shared?: boolean } } options
969+ * @return {SharedOptions }
956970 * @private
957971 */
958972 _getSharedOptions ( mode , el , options ) {
@@ -968,7 +982,8 @@ class DatasetController {
968982 /**
969983 * Utility for determining if `options` should be included in the updated properties
970984 * @param {string } mode
971- * @param {{ target: any; options: any; } } sharedOptions
985+ * @param {SharedOptions } sharedOptions
986+ * @return {boolean }
972987 * @private
973988 */
974989 _includeOptions ( mode , sharedOptions ) {
@@ -980,7 +995,7 @@ class DatasetController {
980995
981996 /**
982997 * Utility for updating a element with new properties, using animations when appropriate.
983- * @param {import("../core/core.element").default } element
998+ * @param {Element } element
984999 * @param {number } index
9851000 * @param {object } properties
9861001 * @param {string } mode
@@ -996,7 +1011,7 @@ class DatasetController {
9961011
9971012 /**
9981013 * Utility to animate the shared options, that are potentially affecting multiple elements.
999- * @param {{ target: any; options: any; } } sharedOptions
1014+ * @param {SharedOptions } sharedOptions
10001015 * @param {string } mode
10011016 * @private
10021017 */
@@ -1007,7 +1022,7 @@ class DatasetController {
10071022 }
10081023
10091024 /**
1010- * @param {import("../core/core.element").default } element
1025+ * @param {Element } element
10111026 * @param {number } index
10121027 * @param {string } mode
10131028 * @param {boolean } active
@@ -1019,7 +1034,7 @@ class DatasetController {
10191034 }
10201035
10211036 /**
1022- * @param {import("../core/core.element").default } element
1037+ * @param {Element } element
10231038 * @param {number } datasetIndex
10241039 * @param {number } index
10251040 */
@@ -1028,7 +1043,7 @@ class DatasetController {
10281043 }
10291044
10301045 /**
1031- * @param {import("../core/core.element").default } element
1046+ * @param {Element } element
10321047 * @param {number } datasetIndex
10331048 * @param {number } index
10341049 */
@@ -1105,7 +1120,12 @@ class DatasetController {
11051120 me . updateElements ( elements , start , 'reset' ) ;
11061121 }
11071122
1108- updateElements ( element , start , mode ) { } // eslint-disable-line no-unused-vars
1123+ /**
1124+ * @param {Element[] } elements
1125+ * @param {number } start
1126+ * @param {string } mode
1127+ */
1128+ updateElements ( elements , start , mode ) { } // eslint-disable-line no-unused-vars
11091129
11101130 /**
11111131 * @private
0 commit comments