]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Cleanup some Typescript comments (#7088)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Wed, 12 Feb 2020 13:03:23 +0000 (05:03 -0800)
committerGitHub <noreply@github.com>
Wed, 12 Feb 2020 13:03:23 +0000 (08:03 -0500)
src/core/core.interaction.js
src/core/core.plugins.js
src/helpers/helpers.segment.js
src/scales/scale.time.js

index 12adbb62f46c6ed800b1a1dbbbcf405d584353c8..2213dc26b3518e0d58de6c13c4c8a3391916eb07 100644 (file)
@@ -6,10 +6,8 @@ import {_lookupByKey, _rlookupByKey} from '../helpers/helpers.collection';
 
 /**
  * @typedef { import("./core.controller").default } Chart
- */
-
-/**
  * @typedef { import("../platform/platform.base").IEvent } IEvent
+ * @typedef {{axis?:'x'|'y'|'xy', intersect:boolean}} IInteractionOptions
  */
 
 /**
@@ -181,16 +179,6 @@ function getNearestItems(chart, position, axis, intersect) {
        return items;
 }
 
-/**
- * @interface IInteractionOptions
- * @typedef {object} IInteractionOptions
- */
-/**
- * If true, only consider items that intersect the point
- * @name IInterfaceOptions#boolean
- * @type Boolean
- */
-
 /**
  * Contains interaction related functions
  * @namespace Chart.Interaction
index 0407396760b0f8cefa6a3e8ec77f5bfd0109fb31..9005280139633d563ae40ee468eb957e46804efd 100644 (file)
@@ -5,13 +5,7 @@ import {clone} from '../helpers/helpers.core';
 
 /**
  * @typedef { import("./core.controller").default } Chart
- */
-
-/**
  * @typedef { import("../platform/platform.base").IEvent } IEvent
- */
-
-/**
  * @typedef { import("../plugins/plugin.tooltip").default } Tooltip
  */
 
index b514d89f8b3a6c84230f75c167b0422a75e76345..1a4f5fec067ac2d455e4c3d3fb8cfeb657423058 100644 (file)
@@ -4,9 +4,6 @@ import {_angleBetween, _angleDiff, _normalizeAngle} from './helpers.math';
 
 /**
  * @typedef { import("../elements/element.line").default } Line
- */
-
-/**
  * @typedef { import("../elements/element.point").default } Point
  */
 
index 455dd99a857b7fca7ba0ccf2694b6f98481c96a3..bff10658e075cf0383cfe1653123802a0c07ef72 100644 (file)
@@ -15,7 +15,7 @@ import {_lookup, _lookupByKey} from '../helpers/helpers.collection';
 const MAX_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
 
 /**
- * @type {Map<Unit, {common: boolean, size: number, steps: number|undefined}>}
+ * @type {Map<Unit, {common: boolean, size: number, steps?: number}>}
  */
 const INTERVALS = new Map();
 INTERVALS.set('millisecond', {common: true, size: 1, steps: 1000});
@@ -26,7 +26,7 @@ INTERVALS.set('day', {common: true, size: 86400000, steps: 30});
 INTERVALS.set('week', {common: false, size: 604800000, steps: 4});
 INTERVALS.set('month', {common: true, size: 2.628e9, steps: 12});
 INTERVALS.set('quarter', {common: false, size: 7.884e9, steps: 4});
-INTERVALS.set('year', {common: true, size: 3.154e10, steps: undefined});
+INTERVALS.set('year', {common: true, size: 3.154e10});
 
 /**
  * @type {Unit[]}