Skip to content

Commit

Permalink
Fix TS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaindik committed Sep 3, 2024
1 parent 47e73eb commit 50413c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interface TemplateProps {

const Template: Story<TemplateProps> = (args) => {
return (
<FinalReadOnlyStorybookProviders kibanaServicesMock={args.kibanaServicesMock}>
<FinalReadOnlyStorybookProviders>
<MockMlData>
<FinalReadOnly
fieldName="machine_learning_job_id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import React from 'react';
import { assertUnreachable } from '../../../../../../../common/utility_types';
import type { DiffableAllFields } from '../../../../../../../common/api/detection_engine';
import { KqlQueryReadOnly } from './fields/kql_query';
import { DataSourceReadOnly } from './fields/data_source/data_source';
Expand Down Expand Up @@ -85,6 +84,6 @@ export function FinalReadOnly({ fieldName, finalDiffableRule }: FinalReadonlyPro
/>
);
default:
return assertUnreachable(fieldName);
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ function createKibanaServicesMock(overrides?: Partial<CoreStart>) {
},
},
uiSettings: {},
} as unknown as CoreStart;
};

return merge(baseMock, overrides);
}

interface StorybookProvidersProps {
children: React.ReactNode;
kibanaServicesMock?: ReturnType<typeof createKibanaServicesMock>;
kibanaServicesMock?: Record<string, unknown>;
}

export function FinalReadOnlyStorybookProviders({
Expand Down

0 comments on commit 50413c4

Please sign in to comment.