From 50413c4d06b5a0c542a0354dbae55aa1157988f9 Mon Sep 17 00:00:00 2001 From: Nikita Indik Date: Tue, 3 Sep 2024 12:02:22 +0200 Subject: [PATCH] Fix TS issues --- .../machine_learning_job_id.stories.tsx | 2 +- .../three_way_diff/final_readonly/final_readonly.tsx | 3 +-- .../storybook/final_readonly_storybook_providers.tsx | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_readonly/fields/machine_learning_job_id/machine_learning_job_id.stories.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_readonly/fields/machine_learning_job_id/machine_learning_job_id.stories.tsx index 7783bb9b70041..1cdb6e8f76ee2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_readonly/fields/machine_learning_job_id/machine_learning_job_id.stories.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_readonly/fields/machine_learning_job_id/machine_learning_job_id.stories.tsx @@ -66,7 +66,7 @@ interface TemplateProps { const Template: Story = (args) => { return ( - + ); default: - return assertUnreachable(fieldName); + return null; } } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_readonly/storybook/final_readonly_storybook_providers.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_readonly/storybook/final_readonly_storybook_providers.tsx index 217a14e340edf..76cbc2f8f4b4c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_readonly/storybook/final_readonly_storybook_providers.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/three_way_diff/final_readonly/storybook/final_readonly_storybook_providers.tsx @@ -42,14 +42,14 @@ function createKibanaServicesMock(overrides?: Partial) { }, }, uiSettings: {}, - } as unknown as CoreStart; + }; return merge(baseMock, overrides); } interface StorybookProvidersProps { children: React.ReactNode; - kibanaServicesMock?: ReturnType; + kibanaServicesMock?: Record; } export function FinalReadOnlyStorybookProviders({