From 202bd08d1500a44ae998012942f4e3901f19bfbf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 20:41:29 +0000 Subject: [PATCH] chore(deps): update typescript (#2300) * chore(deps): update typescript * fix: unnecessary assertions --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: nickofthyme --- package.json | 6 +- .../chart_types/bullet_graph/utils/angular.ts | 2 +- .../crosshair_utils.linear_snap.test.ts | 138 +++++++++--------- .../rendering/rendering.areas.test.ts | 4 +- .../rendering/rendering.lines.test.ts | 4 +- yarn.lock | 108 +++++++------- 6 files changed, 131 insertions(+), 131 deletions(-) diff --git a/package.json b/package.json index 40cbed99e2..431499e065 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "@emotion/react": "^11.10.5", "@emotion/css": "^11.10.5", "@mdx-js/loader": "^1.6.6", - "@microsoft/api-documenter": "^7.23.16", + "@microsoft/api-documenter": "^7.23.17", "@microsoft/api-extractor": "^7.39.1", "@semantic-release/changelog": "^6.0.1", "@semantic-release/commit-analyzer": "^9.0.2", @@ -102,8 +102,8 @@ "@types/seedrandom": "^2.4.28", "@types/url-parse": "^1.4.3", "@types/uuid": "^8.3.4", - "@typescript-eslint/eslint-plugin": "^6.17.0", - "@typescript-eslint/parser": "^6.17.0", + "@typescript-eslint/eslint-plugin": "^6.19.0", + "@typescript-eslint/parser": "^6.19.0", "babel-loader": "^8.3.0", "autoprefixer": "^9.0.0", "backport": "^5.6.6", diff --git a/packages/charts/src/chart_types/bullet_graph/utils/angular.ts b/packages/charts/src/chart_types/bullet_graph/utils/angular.ts index 56d9bb35f7..600ed024a1 100644 --- a/packages/charts/src/chart_types/bullet_graph/utils/angular.ts +++ b/packages/charts/src/chart_types/bullet_graph/utils/angular.ts @@ -35,7 +35,7 @@ export function getAnglesBySize(subtype: BulletGraphSubtype): [startAngle: numbe if (subtype === BulletGraphSubtype.vertical || subtype === BulletGraphSubtype.horizontal) { throw new Error('Attempting to retrieve angle size from horizontal/vertical bullet'); } - const angles = sizeAngles[subtype] ?? sizeAngles[BulletGraphSubtype.twoThirdsCircle]!; + const angles = sizeAngles[subtype] ?? sizeAngles[BulletGraphSubtype.twoThirdsCircle]; // Negative angles used to match current radian pattern const startAngle = -angles.startAngle; // limit endAngle to startAngle +/- 2π diff --git a/packages/charts/src/chart_types/xy_chart/crosshair/crosshair_utils.linear_snap.test.ts b/packages/charts/src/chart_types/xy_chart/crosshair/crosshair_utils.linear_snap.test.ts index c6361ec4fe..cbb21a6cc9 100644 --- a/packages/charts/src/chart_types/xy_chart/crosshair/crosshair_utils.linear_snap.test.ts +++ b/packages/charts/src/chart_types/xy_chart/crosshair/crosshair_utils.linear_snap.test.ts @@ -253,7 +253,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 200, y: 0 }, - lineSeriesScale.invertWithStep(200, [0, 1, 2])!, + lineSeriesScale.invertWithStep(200, [0, 1, 2]), snapPosition, lineSeriesScale, 1, @@ -264,7 +264,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 200 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 1, @@ -275,7 +275,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: -1, y: 0 }, - lineSeriesScale.invertWithStep(-1, [0, 1, 2])!, + lineSeriesScale.invertWithStep(-1, [0, 1, 2]), snapPosition, lineSeriesScale, 1, @@ -286,7 +286,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: -1 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 1, @@ -306,7 +306,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -324,7 +324,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 45 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -342,7 +342,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 40, y: 0 }, - lineSeriesScale.invertWithStep(40, [0, 1, 2])!, + lineSeriesScale.invertWithStep(40, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -360,7 +360,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 90, y: 0 }, - lineSeriesScale.invertWithStep(90, [0, 1, 2])!, + lineSeriesScale.invertWithStep(90, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -378,7 +378,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 200, y: 0 }, - lineSeriesScale.invertWithStep(200, [0, 1, 2])!, + lineSeriesScale.invertWithStep(200, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -395,7 +395,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -413,7 +413,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 45 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -431,7 +431,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 20, y: 0 }, - lineSeriesScale.invertWithStep(20, [0, 1, 2])!, + lineSeriesScale.invertWithStep(20, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -449,7 +449,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 40, y: 0 }, - lineSeriesScale.invertWithStep(40, [0, 1, 2])!, + lineSeriesScale.invertWithStep(40, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -467,7 +467,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 95, y: 0 }, - lineSeriesScale.invertWithStep(95, [0, 1, 2])!, + lineSeriesScale.invertWithStep(95, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -485,7 +485,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 200, y: 0 }, - lineSeriesScale.invertWithStep(200, [0, 1, 2])!, + lineSeriesScale.invertWithStep(200, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -503,7 +503,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -522,7 +522,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 45 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -540,7 +540,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 40, y: 0 }, - lineSeriesScale.invertWithStep(40, [0, 1, 2])!, + lineSeriesScale.invertWithStep(40, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -558,7 +558,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 90, y: 0 }, - lineSeriesScale.invertWithStep(90, [0, 1, 2])!, + lineSeriesScale.invertWithStep(90, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -576,7 +576,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 200, y: 0 }, - lineSeriesScale.invertWithStep(200, [0, 1, 2])!, + lineSeriesScale.invertWithStep(200, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -594,7 +594,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -612,7 +612,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 45 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -630,7 +630,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 20, y: 0 }, - lineSeriesScale.invertWithStep(20, [0, 1, 2])!, + lineSeriesScale.invertWithStep(20, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -648,7 +648,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 40, y: 0 }, - lineSeriesScale.invertWithStep(40, [0, 1, 2])!, + lineSeriesScale.invertWithStep(40, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -666,7 +666,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 95, y: 0 }, - lineSeriesScale.invertWithStep(95, [0, 1, 2])!, + lineSeriesScale.invertWithStep(95, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -684,7 +684,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 200, y: 0 }, - lineSeriesScale.invertWithStep(200, [0, 1, 2])!, + lineSeriesScale.invertWithStep(200, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -702,7 +702,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -720,7 +720,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 45, y: 0 }, - lineSeriesScale.invertWithStep(45, [0, 1, 2])!, + lineSeriesScale.invertWithStep(45, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -738,7 +738,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 40 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -756,7 +756,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 90 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -774,7 +774,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 200 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -792,7 +792,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -810,7 +810,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 45, y: 0 }, - lineSeriesScale.invertWithStep(45, [0, 1, 2])!, + lineSeriesScale.invertWithStep(45, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -828,7 +828,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 20 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -846,7 +846,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 40 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -864,7 +864,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 95 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -882,7 +882,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 200 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -900,7 +900,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -918,7 +918,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 45, y: 0 }, - lineSeriesScale.invertWithStep(45, [0, 1, 2])!, + lineSeriesScale.invertWithStep(45, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -936,7 +936,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 40 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -954,7 +954,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 90 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -972,7 +972,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 200 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -990,7 +990,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -1008,7 +1008,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 45, y: 0 }, - lineSeriesScale.invertWithStep(45, [0, 1, 2])!, + lineSeriesScale.invertWithStep(45, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -1026,7 +1026,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 20 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -1044,7 +1044,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 40 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -1062,7 +1062,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 95 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -1080,7 +1080,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 200 }, - lineSeriesScale.invertWithStep(0, [0, 1, 2])!, + lineSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, lineSeriesScale, 0, @@ -1101,7 +1101,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1119,7 +1119,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 45 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1137,7 +1137,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 40, y: 0 }, - barSeriesScale.invertWithStep(40, [0, 1, 2])!, + barSeriesScale.invertWithStep(40, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1152,7 +1152,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 41, y: 0 }, - barSeriesScale.invertWithStep(41, [0, 1, 2])!, + barSeriesScale.invertWithStep(41, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1170,7 +1170,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 90, y: 0 }, - barSeriesScale.invertWithStep(90, [0, 1, 2])!, + barSeriesScale.invertWithStep(90, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1188,7 +1188,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 200, y: 0 }, - barSeriesScale.invertWithStep(200, [0, 1, 2])!, + barSeriesScale.invertWithStep(200, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1206,7 +1206,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1224,7 +1224,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 45 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1242,7 +1242,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 41, y: 0 }, - barSeriesScale.invertWithStep(41, [0, 1, 2])!, + barSeriesScale.invertWithStep(41, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1260,7 +1260,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 90, y: 0 }, - barSeriesScale.invertWithStep(90, [0, 1, 2])!, + barSeriesScale.invertWithStep(90, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1278,7 +1278,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 200, y: 0 }, - barSeriesScale.invertWithStep(200, [0, 1, 2])!, + barSeriesScale.invertWithStep(200, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1296,7 +1296,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1314,7 +1314,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 45, y: 0 }, - barSeriesScale.invertWithStep(45, [0, 1, 2])!, + barSeriesScale.invertWithStep(45, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1332,7 +1332,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 40 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1350,7 +1350,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 90 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1368,7 +1368,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 200 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1386,7 +1386,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 0 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1404,7 +1404,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 45, y: 0 }, - barSeriesScale.invertWithStep(45, [0, 1, 2])!, + barSeriesScale.invertWithStep(45, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1422,7 +1422,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 40 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1440,7 +1440,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 90 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, @@ -1458,7 +1458,7 @@ describe('Crosshair utils linear scale', () => { chartRotation, chartDimensions, { x: 0, y: 200 }, - barSeriesScale.invertWithStep(0, [0, 1, 2])!, + barSeriesScale.invertWithStep(0, [0, 1, 2]), snapPosition, barSeriesScale, 1, diff --git a/packages/charts/src/chart_types/xy_chart/rendering/rendering.areas.test.ts b/packages/charts/src/chart_types/xy_chart/rendering/rendering.areas.test.ts index 60d0a7f174..7e21753551 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/rendering.areas.test.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/rendering.areas.test.ts @@ -400,10 +400,10 @@ describe('Rendering points - areas', () => { expect(points.length).toBe(7); // all the points expect null geometries expect(geometriesIndex.size).toEqual(9); - const nullIndexdGeometry = geometriesIndex.find(2, 10)!; + const nullIndexdGeometry = geometriesIndex.find(2, 10); expect(nullIndexdGeometry).toHaveLength(1); - const zeroValueIndexdGeometry = geometriesIndex.find(5, 10)!; + const zeroValueIndexdGeometry = geometriesIndex.find(5, 10); expect(zeroValueIndexdGeometry).toBeDefined(); expect(zeroValueIndexdGeometry.length).toBe(1); // the zero value is scaled to NaN diff --git a/packages/charts/src/chart_types/xy_chart/rendering/rendering.lines.test.ts b/packages/charts/src/chart_types/xy_chart/rendering/rendering.lines.test.ts index 83e711c50e..8840e7fa2d 100644 --- a/packages/charts/src/chart_types/xy_chart/rendering/rendering.lines.test.ts +++ b/packages/charts/src/chart_types/xy_chart/rendering/rendering.lines.test.ts @@ -360,10 +360,10 @@ describe('Rendering points - line', () => { expect(points.length).toBe(7); // all the points including null geometries expect(geometriesIndex.size).toEqual(9); - const nullIndexdGeometry = geometriesIndex.find(2, 10)!; + const nullIndexdGeometry = geometriesIndex.find(2, 10); expect(nullIndexdGeometry).toHaveLength(1); - const zeroValueIndexdGeometry = geometriesIndex.find(5, 10)!; + const zeroValueIndexdGeometry = geometriesIndex.find(5, 10); expect(zeroValueIndexdGeometry).toBeDefined(); expect(zeroValueIndexdGeometry.length).toBe(1); // the zero value is scaled to NaN diff --git a/yarn.lock b/yarn.lock index e107ae2d6b..9aef5271b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4627,10 +4627,10 @@ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.6.tgz#9c70eb7e7e4abc1083c8edf7151d35a19e442c00" integrity sha512-PKTHVgMHnK5p+kcMWWNnZuoR7O19VmHiOujmVcyN50hya7qIdDb5vvsYC+dwLxApEXiABhLozq0dlIwFeS3yjg== -"@microsoft/api-documenter@^7.23.16": - version "7.23.16" - resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.23.16.tgz#550ac8a715fe43ed5f343386a8aea7e18b0c559c" - integrity sha512-B8Vr9oBwzbtNt5uyhbFLymEpzSYKWkQ5WED59zjEXY4981qcBLXprQoTZYdyrhokVwzUxLIcqrS0uvZag39QlQ== +"@microsoft/api-documenter@^7.23.17": + version "7.23.17" + resolved "https://registry.yarnpkg.com/@microsoft/api-documenter/-/api-documenter-7.23.17.tgz#fa6da91eba5340ff01aeb2a7e7596946ab76da5d" + integrity sha512-9AaEo0LaVdx5qljF4wX1kjZmWRcFDM9OAdW5HXEdapuIyCq8/uAJ4W9q5ee0ntJuJ+Z0g8ynfA3/WEyAuQt/Rw== dependencies: "@microsoft/api-extractor-model" "7.28.4" "@microsoft/tsdoc" "0.14.2" @@ -7081,16 +7081,16 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz#dfc38f790704ba8a54a1277c51efdb489f6ecf9f" - integrity sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ== +"@typescript-eslint/eslint-plugin@^6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.0.tgz#db03f3313b57a30fbbdad2e6929e88fc7feaf9ba" + integrity sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.17.0" - "@typescript-eslint/type-utils" "6.17.0" - "@typescript-eslint/utils" "6.17.0" - "@typescript-eslint/visitor-keys" "6.17.0" + "@typescript-eslint/scope-manager" "6.19.0" + "@typescript-eslint/type-utils" "6.19.0" + "@typescript-eslint/utils" "6.19.0" + "@typescript-eslint/visitor-keys" "6.19.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -7098,15 +7098,15 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.17.0.tgz#8cd7a0599888ca6056082225b2fdf9a635bf32a1" - integrity sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A== +"@typescript-eslint/parser@^6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.19.0.tgz#80344086f362181890ade7e94fc35fe0480bfdf5" + integrity sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow== dependencies: - "@typescript-eslint/scope-manager" "6.17.0" - "@typescript-eslint/types" "6.17.0" - "@typescript-eslint/typescript-estree" "6.17.0" - "@typescript-eslint/visitor-keys" "6.17.0" + "@typescript-eslint/scope-manager" "6.19.0" + "@typescript-eslint/types" "6.19.0" + "@typescript-eslint/typescript-estree" "6.19.0" + "@typescript-eslint/visitor-keys" "6.19.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.32.0": @@ -7117,21 +7117,21 @@ "@typescript-eslint/types" "5.32.0" "@typescript-eslint/visitor-keys" "5.32.0" -"@typescript-eslint/scope-manager@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz#70e6c1334d0d76562dfa61aed9009c140a7601b4" - integrity sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA== +"@typescript-eslint/scope-manager@6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.19.0.tgz#b6d2abb825b29ab70cb542d220e40c61c1678116" + integrity sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ== dependencies: - "@typescript-eslint/types" "6.17.0" - "@typescript-eslint/visitor-keys" "6.17.0" + "@typescript-eslint/types" "6.19.0" + "@typescript-eslint/visitor-keys" "6.19.0" -"@typescript-eslint/type-utils@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz#5febad3f523e393006614cbda28b826925b728d5" - integrity sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg== +"@typescript-eslint/type-utils@6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.19.0.tgz#522a494ef0d3e9fdc5e23a7c22c9331bbade0101" + integrity sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w== dependencies: - "@typescript-eslint/typescript-estree" "6.17.0" - "@typescript-eslint/utils" "6.17.0" + "@typescript-eslint/typescript-estree" "6.19.0" + "@typescript-eslint/utils" "6.19.0" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -7140,10 +7140,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.32.0.tgz#484273021eeeae87ddb288f39586ef5efeb6dcd8" integrity sha512-EBUKs68DOcT/EjGfzywp+f8wG9Zw6gj6BjWu7KV/IYllqKJFPlZlLSYw/PTvVyiRw50t6wVbgv4p9uE2h6sZrQ== -"@typescript-eslint/types@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.17.0.tgz#844a92eb7c527110bf9a7d177e3f22bd5a2f40cb" - integrity sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A== +"@typescript-eslint/types@6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.19.0.tgz#689b0498c436272a6a2059b09f44bcbd90de294a" + integrity sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A== "@typescript-eslint/typescript-estree@5.32.0": version "5.32.0" @@ -7158,13 +7158,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz#b913d19886c52d8dc3db856903a36c6c64fd62aa" - integrity sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg== +"@typescript-eslint/typescript-estree@6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.0.tgz#0813ba364a409afb4d62348aec0202600cb468fa" + integrity sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ== dependencies: - "@typescript-eslint/types" "6.17.0" - "@typescript-eslint/visitor-keys" "6.17.0" + "@typescript-eslint/types" "6.19.0" + "@typescript-eslint/visitor-keys" "6.19.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -7172,17 +7172,17 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.17.0.tgz#f2b16d4c9984474656c420438cdede7eccd4079e" - integrity sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ== +"@typescript-eslint/utils@6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.19.0.tgz#557b72c3eeb4f73bef8037c85dae57b21beb1a4b" + integrity sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.17.0" - "@typescript-eslint/types" "6.17.0" - "@typescript-eslint/typescript-estree" "6.17.0" + "@typescript-eslint/scope-manager" "6.19.0" + "@typescript-eslint/types" "6.19.0" + "@typescript-eslint/typescript-estree" "6.19.0" semver "^7.5.4" "@typescript-eslint/utils@^5.10.0": @@ -7205,12 +7205,12 @@ "@typescript-eslint/types" "5.32.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@6.17.0": - version "6.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz#3ed043709c39b43ec1e58694f329e0b0430c26b6" - integrity sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg== +"@typescript-eslint/visitor-keys@6.19.0": + version "6.19.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.0.tgz#4565e0ecd63ca1f81b96f1dd76e49f746c6b2b49" + integrity sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ== dependencies: - "@typescript-eslint/types" "6.17.0" + "@typescript-eslint/types" "6.19.0" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0":