From 01ace8919db354f4d6225388993cc79679ea86cc Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Fri, 2 Oct 2020 12:34:29 -0400 Subject: [PATCH] More typing fixes. --- .../public/components/monitor/ping_list/ping_list.tsx | 4 ++-- .../synthetics/__tests__/step_screenshot_display.test.tsx | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/uptime/public/components/monitor/ping_list/ping_list.tsx b/x-pack/plugins/uptime/public/components/monitor/ping_list/ping_list.tsx index 0637c99b9181b9..590b2f787bac46 100644 --- a/x-pack/plugins/uptime/public/components/monitor/ping_list/ping_list.tsx +++ b/x-pack/plugins/uptime/public/components/monitor/ping_list/ping_list.tsx @@ -193,8 +193,8 @@ export const PingListComponent = (props: Props) => { useEffect(() => { const parsed = JSON.parse(expandedIdsToRemove); if (parsed.length) { - parsed.forEach((p) => { - delete expandedRows[p]; + parsed.forEach((docId: string) => { + delete expandedRows[docId]; }); setExpandedRows(expandedRows); } diff --git a/x-pack/plugins/uptime/public/components/monitor/synthetics/__tests__/step_screenshot_display.test.tsx b/x-pack/plugins/uptime/public/components/monitor/synthetics/__tests__/step_screenshot_display.test.tsx index 360e4694d5c739..5b3eca6727eb90 100644 --- a/x-pack/plugins/uptime/public/components/monitor/synthetics/__tests__/step_screenshot_display.test.tsx +++ b/x-pack/plugins/uptime/public/components/monitor/synthetics/__tests__/step_screenshot_display.test.tsx @@ -10,13 +10,8 @@ import * as reactUse from 'react-use'; import { StepScreenshotDisplay } from '../step_screenshot_display'; describe('StepScreenshotDisplayProps', () => { + // @ts-ignore missing fields don't matter in this test, the component in question only relies on `isIntersecting` jest.spyOn(reactUse, 'useIntersection').mockImplementation(() => ({ - boundingClientRect: null, - intersectionRatio: null, - intersectionRect: null, - rootBounds: null, - target: null, - time: null, isIntersecting: true, }));