From d874c4c798f2faaf4219d7568f0c900325fb94bd Mon Sep 17 00:00:00 2001 From: Frank Hassanabad Date: Thu, 2 Dec 2021 09:42:51 -0700 Subject: [PATCH] Removes tech debt from export all (#120170) ## Summary See: https://github.com/elastic/kibana/issues/110903 This removes the `export *` from: * lists plugin This also adds `import type` and `export type` in a few areas and fixes the `LicenseType` by changing it from `server` to using the version from `common` to remove the restricted paths. This extra addition prevents more memory leaks when we run jest. --- x-pack/plugins/lists/public/index.ts | 6 +- .../security/common/licensing/index.mock.ts | 6 +- .../add_exception_modal/index.test.tsx | 65 +++++++++++-------- .../exceptions/add_exception_modal/index.tsx | 5 +- .../edit_exception_modal/index.test.tsx | 60 ++++++++--------- .../exceptions/edit_exception_modal/index.tsx | 4 +- .../view/components/form/index.tsx | 8 +-- .../security_solution/public/plugin.tsx | 2 +- .../public/shared_imports.ts | 2 - .../plugins/security_solution/public/types.ts | 64 +++++++++--------- 10 files changed, 109 insertions(+), 113 deletions(-) diff --git a/x-pack/plugins/lists/public/index.ts b/x-pack/plugins/lists/public/index.ts index 977b7f462777e..f35de2328714b 100644 --- a/x-pack/plugins/lists/public/index.ts +++ b/x-pack/plugins/lists/public/index.ts @@ -5,10 +5,8 @@ * 2.0. */ -// TODO: https://github.com/elastic/kibana/issues/110903 -/* eslint-disable @kbn/eslint/no_export_all */ - -export * from './shared_exports'; +export { getExceptionBuilderComponentLazy } from './exceptions/components/builder/index'; +export type { OnChangeProps } from './exceptions/components/builder/index'; import type { PluginInitializerContext } from '../../../../src/core/public'; diff --git a/x-pack/plugins/security/common/licensing/index.mock.ts b/x-pack/plugins/security/common/licensing/index.mock.ts index bd85df3dea638..f9e6a0b756d00 100644 --- a/x-pack/plugins/security/common/licensing/index.mock.ts +++ b/x-pack/plugins/security/common/licensing/index.mock.ts @@ -7,10 +7,8 @@ import { of } from 'rxjs'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { LICENSE_TYPE } from '../../../licensing/server'; -// eslint-disable-next-line @kbn/eslint/no-restricted-paths -import type { LicenseType } from '../../../licensing/server'; +import type { LicenseType } from '../../../licensing/common/types'; +import { LICENSE_TYPE } from '../../../licensing/common/types'; import type { SecurityLicenseFeatures } from './license_features'; import type { SecurityLicense } from './license_service'; diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx index ac70d5276beb9..0e118d527c69b 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.test.tsx @@ -12,7 +12,7 @@ import { waitFor } from '@testing-library/react'; import { AddExceptionModal } from './'; import { useCurrentUser } from '../../../../common/lib/kibana'; -import { ExceptionBuilder } from '../../../../shared_imports'; +import { getExceptionBuilderComponentLazy } from '../../../../../../lists/public'; import { useAsync } from '@kbn/securitysolution-hook-utils'; import { getExceptionListSchemaMock } from '../../../../../../lists/common/schemas/response/exception_list_schema.mock'; import { useFetchIndex } from '../../../containers/source'; @@ -54,47 +54,58 @@ jest.mock('@kbn/securitysolution-hook-utils', () => ({ useAsync: jest.fn(), })); jest.mock('../../../../detections/containers/detection_engine/rules/use_rule_async'); +jest.mock('../../../../../../lists/public'); + +const mockGetExceptionBuilderComponentLazy = getExceptionBuilderComponentLazy as jest.Mock< + ReturnType +>; +const mockUseAsync = useAsync as jest.Mock>; +const mockUseAddOrUpdateException = useAddOrUpdateException as jest.Mock< + ReturnType +>; +const mockUseFetchOrCreateRuleExceptionList = useFetchOrCreateRuleExceptionList as jest.Mock< + ReturnType +>; +const mockUseSignalIndex = useSignalIndex as jest.Mock>>; +const mockUseFetchIndex = useFetchIndex as jest.Mock; +const mockUseCurrentUser = useCurrentUser as jest.Mock>>; +const mockUseRuleAsync = useRuleAsync as jest.Mock; describe('When the add exception modal is opened', () => { const ruleName = 'test rule'; let defaultEndpointItems: jest.SpyInstance< ReturnType >; - let ExceptionBuilderComponent: jest.SpyInstance< - ReturnType - >; beforeEach(() => { - const emptyComp = ; + mockGetExceptionBuilderComponentLazy.mockReturnValue( + + ); defaultEndpointItems = jest.spyOn(helpers, 'defaultEndpointExceptionItems'); - ExceptionBuilderComponent = jest - .spyOn(ExceptionBuilder, 'getExceptionBuilderComponentLazy') - .mockReturnValue(emptyComp); - (useAsync as jest.Mock).mockImplementation(() => ({ + mockUseAsync.mockImplementation(() => ({ start: jest.fn(), loading: false, + error: {}, + result: true, })); - (useAddOrUpdateException as jest.Mock).mockImplementation(() => [ - { isLoading: false }, - jest.fn(), - ]); - (useFetchOrCreateRuleExceptionList as jest.Mock).mockImplementation(() => [ + mockUseAddOrUpdateException.mockImplementation(() => [{ isLoading: false }, jest.fn()]); + mockUseFetchOrCreateRuleExceptionList.mockImplementation(() => [ false, getExceptionListSchemaMock(), ]); - (useSignalIndex as jest.Mock).mockImplementation(() => ({ + mockUseSignalIndex.mockImplementation(() => ({ loading: false, signalIndexName: 'mock-siem-signals-index', })); - (useFetchIndex as jest.Mock).mockImplementation(() => [ + mockUseFetchIndex.mockImplementation(() => [ false, { indexPatterns: stubIndexPattern, }, ]); - (useCurrentUser as jest.Mock).mockReturnValue({ username: 'test-username' }); - (useRuleAsync as jest.Mock).mockImplementation(() => ({ + mockUseCurrentUser.mockReturnValue({ username: 'test-username' }); + mockUseRuleAsync.mockImplementation(() => ({ rule: getRulesSchemaMock(), })); }); @@ -108,7 +119,7 @@ describe('When the add exception modal is opened', () => { let wrapper: ReactWrapper; beforeEach(() => { // Mocks one of the hooks as loading - (useFetchIndex as jest.Mock).mockImplementation(() => [ + mockUseFetchIndex.mockImplementation(() => [ true, { indexPatterns: stubIndexPattern, @@ -147,7 +158,7 @@ describe('When the add exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => callProps.onChange({ exceptionItems: [] })); }); it('has the add exception button disabled', () => { @@ -192,7 +203,7 @@ describe('When the add exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] }) ); @@ -252,7 +263,7 @@ describe('When the add exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => callProps.onChange({ exceptionItems: [getExceptionListItemSchemaMock()] }) ); @@ -288,7 +299,7 @@ describe('When the add exception modal is opened', () => { describe('when there is an exception being created on a sequence eql rule type', () => { let wrapper: ReactWrapper; beforeEach(async () => { - (useRuleAsync as jest.Mock).mockImplementation(() => ({ + mockUseRuleAsync.mockImplementation(() => ({ rule: { ...getRulesEqlSchemaMock(), query: @@ -313,7 +324,7 @@ describe('When the add exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => callProps.onChange({ exceptionItems: [getExceptionListItemSchemaMock()] }) ); @@ -354,7 +365,7 @@ describe('When the add exception modal is opened', () => { }; beforeEach(async () => { // Mocks the index patterns to contain the pre-populated endpoint fields so that the exception qualifies as bulk closable - (useFetchIndex as jest.Mock).mockImplementation(() => [ + mockUseFetchIndex.mockImplementation(() => [ false, { indexPatterns: { @@ -387,7 +398,7 @@ describe('When the add exception modal is opened', () => { /> ); - callProps = ExceptionBuilderComponent.mock.calls[0][0]; + callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] }) ); @@ -456,7 +467,7 @@ describe('When the add exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => callProps.onChange({ exceptionItems: [], errorExists: true })); expect( wrapper.find('button[data-test-subj="add-exception-confirm-button"]').getDOMNode() diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.tsx index 228b7a2491fde..afff935619740 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/add_exception_modal/index.tsx @@ -38,8 +38,7 @@ import { isThresholdRule, } from '../../../../../common/detection_engine/utils'; import { Status } from '../../../../../common/detection_engine/schemas/common/schemas'; -import { ExceptionBuilder } from '../../../../../public/shared_imports'; - +import { getExceptionBuilderComponentLazy } from '../../../../../../lists/public'; import * as i18nCommon from '../../../translations'; import * as i18n from './translations'; import * as sharedI18n from '../translations'; @@ -475,7 +474,7 @@ export const AddExceptionModal = memo(function AddExceptionModal({ )} - {ExceptionBuilder.getExceptionBuilderComponentLazy({ + {getExceptionBuilderComponentLazy({ allowLargeValueLists: !isEqlRule(maybeRule?.type) && !isThresholdRule(maybeRule?.type), httpService: http, diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx index 8c719373eda71..7a634b7fe10ec 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.test.tsx @@ -24,7 +24,7 @@ import { } from '../../../../../common/detection_engine/schemas/response/rules_schema.mocks'; import { useRuleAsync } from '../../../../detections/containers/detection_engine/rules/use_rule_async'; import { getMockTheme } from '../../../lib/kibana/kibana_react.mock'; -import { ExceptionBuilder } from '../../../../shared_imports'; +import { getExceptionBuilderComponentLazy } from '../../../../../../lists/public'; const mockTheme = getMockTheme({ eui: { @@ -44,39 +44,31 @@ jest.mock('../../../containers/source'); jest.mock('../use_fetch_or_create_rule_exception_list'); jest.mock('../../../../detections/containers/detection_engine/alerts/use_signal_index'); jest.mock('../../../../detections/containers/detection_engine/rules/use_rule_async'); -jest.mock('../../../../shared_imports', () => { - const originalModule = jest.requireActual('../../../../shared_imports'); - const emptyComp = ; - return { - ...originalModule, - ExceptionBuilder: { - getExceptionBuilderComponentLazy: () => emptyComp, - }, - }; -}); +jest.mock('../../../../../../lists/public'); + +const mockGetExceptionBuilderComponentLazy = getExceptionBuilderComponentLazy as jest.Mock< + ReturnType +>; +const mockUseSignalIndex = useSignalIndex as jest.Mock>>; +const mockUseAddOrUpdateException = useAddOrUpdateException as jest.Mock< + ReturnType +>; +const mockUseFetchIndex = useFetchIndex as jest.Mock; +const mockUseCurrentUser = useCurrentUser as jest.Mock>>; +const mockUseRuleAsync = useRuleAsync as jest.Mock; describe('When the edit exception modal is opened', () => { const ruleName = 'test rule'; - let ExceptionBuilderComponent: jest.SpyInstance< - ReturnType - >; - beforeEach(() => { const emptyComp = ; - ExceptionBuilderComponent = jest - .spyOn(ExceptionBuilder, 'getExceptionBuilderComponentLazy') - .mockReturnValue(emptyComp); - - (useSignalIndex as jest.Mock).mockReturnValue({ + mockGetExceptionBuilderComponentLazy.mockReturnValue(emptyComp); + mockUseSignalIndex.mockReturnValue({ loading: false, signalIndexName: 'test-signal', }); - (useAddOrUpdateException as jest.Mock).mockImplementation(() => [ - { isLoading: false }, - jest.fn(), - ]); - (useFetchIndex as jest.Mock).mockImplementation(() => [ + mockUseAddOrUpdateException.mockImplementation(() => [{ isLoading: false }, jest.fn()]); + mockUseFetchIndex.mockImplementation(() => [ false, { indexPatterns: createStubIndexPattern({ @@ -96,8 +88,8 @@ describe('When the edit exception modal is opened', () => { }), }, ]); - (useCurrentUser as jest.Mock).mockReturnValue({ username: 'test-username' }); - (useRuleAsync as jest.Mock).mockImplementation(() => ({ + mockUseCurrentUser.mockReturnValue({ username: 'test-username' }); + mockUseRuleAsync.mockImplementation(() => ({ rule: getRulesSchemaMock(), })); }); @@ -109,7 +101,7 @@ describe('When the edit exception modal is opened', () => { describe('when the modal is loading', () => { it('renders the loading spinner', async () => { - (useFetchIndex as jest.Mock).mockImplementation(() => [ + mockUseFetchIndex.mockImplementation(() => [ true, { indexPatterns: stubIndexPattern, @@ -157,7 +149,7 @@ describe('When the edit exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => { callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] }); }); @@ -202,7 +194,7 @@ describe('When the edit exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => { callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] }); }); @@ -255,7 +247,7 @@ describe('When the edit exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = (getExceptionBuilderComponentLazy as jest.Mock).mock.calls[0][0]; await waitFor(() => { callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] }); }); @@ -299,7 +291,7 @@ describe('When the edit exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => { callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] }); }); @@ -344,7 +336,7 @@ describe('When the edit exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => { callProps.onChange({ exceptionItems: [...callProps.exceptionListItems] }); }); @@ -380,7 +372,7 @@ describe('When the edit exception modal is opened', () => { /> ); - const callProps = ExceptionBuilderComponent.mock.calls[0][0]; + const callProps = mockGetExceptionBuilderComponentLazy.mock.calls[0][0]; await waitFor(() => callProps.onChange({ exceptionItems: [], errorExists: true })); expect( diff --git a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.tsx b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.tsx index 375648e0abc8d..1724f616e7fc8 100644 --- a/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/exceptions/edit_exception_modal/index.tsx @@ -37,7 +37,7 @@ import { import { useFetchIndex } from '../../../containers/source'; import { useSignalIndex } from '../../../../detections/containers/detection_engine/alerts/use_signal_index'; import { useRuleAsync } from '../../../../detections/containers/detection_engine/rules/use_rule_async'; -import { ExceptionBuilder } from '../../../../../public/shared_imports'; +import { getExceptionBuilderComponentLazy } from '../../../../../../lists/public'; import * as i18n from './translations'; import * as sharedI18n from '../translations'; @@ -344,7 +344,7 @@ export const EditExceptionModal = memo(function EditExceptionModal({ )} - {ExceptionBuilder.getExceptionBuilderComponentLazy({ + {getExceptionBuilderComponentLazy({ allowLargeValueLists: !isEqlRule(maybeRule?.type) && !isThresholdRule(maybeRule?.type), httpService: http, diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.tsx index 8f0737067ec6a..703c6c098d11e 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form/index.tsx @@ -30,8 +30,8 @@ import { Loader } from '../../../../../../common/components/loader'; import { useKibana } from '../../../../../../common/lib/kibana'; import { useFetchIndex } from '../../../../../../common/containers/source'; import { AppAction } from '../../../../../../common/store/actions'; -import { ExceptionBuilder } from '../../../../../../shared_imports'; - +import { getExceptionBuilderComponentLazy } from '../../../../../../../../lists/public'; +import type { OnChangeProps } from '../../../../../../../../lists/public'; import { useEventFiltersSelector } from '../../hooks'; import { getFormEntryStateMutable, getHasNameError, getNewComment } from '../../../store/selector'; import { NAME_LABEL, NAME_ERROR, NAME_PLACEHOLDER, OS_LABEL, RULE_NAME } from './translations'; @@ -67,7 +67,7 @@ export const EventFiltersForm: React.FC = memo( ); const handleOnBuilderChange = useCallback( - (arg: ExceptionBuilder.OnChangeProps) => { + (arg: OnChangeProps) => { dispatch({ type: 'eventFiltersChangeForm', payload: { @@ -121,7 +121,7 @@ export const EventFiltersForm: React.FC = memo( const exceptionBuilderComponentMemo = useMemo( () => - ExceptionBuilder.getExceptionBuilderComponentLazy({ + getExceptionBuilderComponentLazy({ allowLargeValueLists: false, httpService: http, autocompleteService: data.autocomplete, diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index 1d60175d56f60..d3a88004bc8dc 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -10,7 +10,7 @@ import reduceReducers from 'reduce-reducers'; import { BehaviorSubject, Subject, Subscription } from 'rxjs'; import { pluck } from 'rxjs/operators'; import { AnyAction, Reducer } from 'redux'; -import { +import type { PluginSetup, PluginStart, SetupPlugins, diff --git a/x-pack/plugins/security_solution/public/shared_imports.ts b/x-pack/plugins/security_solution/public/shared_imports.ts index 8934ad9dab4cd..421b92a6e8b7f 100644 --- a/x-pack/plugins/security_solution/public/shared_imports.ts +++ b/x-pack/plugins/security_solution/public/shared_imports.ts @@ -30,5 +30,3 @@ export { export { Field, SelectField } from '../../../../src/plugins/es_ui_shared/static/forms/components'; export { fieldValidators } from '../../../../src/plugins/es_ui_shared/static/forms/helpers'; export type { ERROR_CODE } from '../../../../src/plugins/es_ui_shared/static/forms/helpers/field_validators/types'; - -export { ExceptionBuilder } from '../../lists/public'; diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index cfca95fddc507..6a5a0f3b42e04 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -5,43 +5,43 @@ * 2.0. */ -import { CoreStart } from '../../../../src/core/public'; -import { HomePublicPluginSetup } from '../../../../src/plugins/home/public'; +import type { CoreStart } from '../../../../src/core/public'; +import type { HomePublicPluginSetup } from '../../../../src/plugins/home/public'; import type { DataPublicPluginStart } from '../../../../src/plugins/data/public'; -import { EmbeddableStart } from '../../../../src/plugins/embeddable/public'; -import { LensPublicStart } from '../../../plugins/lens/public'; -import { NewsfeedPublicPluginStart } from '../../../../src/plugins/newsfeed/public'; -import { Start as InspectorStart } from '../../../../src/plugins/inspector/public'; -import { UiActionsStart } from '../../../../src/plugins/ui_actions/public'; -import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public'; -import { Storage } from '../../../../src/plugins/kibana_utils/public'; -import { FleetStart } from '../../fleet/public'; -import { PluginStart as ListsPluginStart } from '../../lists/public'; -import { SpacesPluginStart } from '../../spaces/public'; -import { +import type { EmbeddableStart } from '../../../../src/plugins/embeddable/public'; +import type { LensPublicStart } from '../../../plugins/lens/public'; +import type { NewsfeedPublicPluginStart } from '../../../../src/plugins/newsfeed/public'; +import type { Start as InspectorStart } from '../../../../src/plugins/inspector/public'; +import type { UiActionsStart } from '../../../../src/plugins/ui_actions/public'; +import type { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public'; +import type { Storage } from '../../../../src/plugins/kibana_utils/public'; +import type { FleetStart } from '../../fleet/public'; +import type { PluginStart as ListsPluginStart } from '../../lists/public'; +import type { SpacesPluginStart } from '../../spaces/public'; +import type { TriggersAndActionsUIPublicPluginSetup as TriggersActionsSetup, TriggersAndActionsUIPublicPluginStart as TriggersActionsStart, } from '../../triggers_actions_ui/public'; -import { CasesUiStart } from '../../cases/public'; -import { SecurityPluginSetup } from '../../security/public'; -import { TimelinesUIStart } from '../../timelines/public'; -import { ResolverPluginSetup } from './resolver/types'; -import { Inspect } from '../common/search_strategy'; -import { MlPluginSetup, MlPluginStart } from '../../ml/public'; +import type { CasesUiStart } from '../../cases/public'; +import type { SecurityPluginSetup } from '../../security/public'; +import type { TimelinesUIStart } from '../../timelines/public'; +import type { ResolverPluginSetup } from './resolver/types'; +import type { Inspect } from '../common/search_strategy'; +import type { MlPluginSetup, MlPluginStart } from '../../ml/public'; -import { Detections } from './detections'; -import { Cases } from './cases'; -import { Exceptions } from './exceptions'; -import { Hosts } from './hosts'; -import { Network } from './network'; -import { Overview } from './overview'; -import { Rules } from './rules'; -import { Timelines } from './timelines'; -import { Management } from './management'; -import { Ueba } from './ueba'; -import { LicensingPluginStart, LicensingPluginSetup } from '../../licensing/public'; -import { DashboardStart } from '../../../../src/plugins/dashboard/public'; -import { IndexPatternFieldEditorStart } from '../../../../src/plugins/data_view_field_editor/public'; +import type { Detections } from './detections'; +import type { Cases } from './cases'; +import type { Exceptions } from './exceptions'; +import type { Hosts } from './hosts'; +import type { Network } from './network'; +import type { Overview } from './overview'; +import type { Rules } from './rules'; +import type { Timelines } from './timelines'; +import type { Management } from './management'; +import type { Ueba } from './ueba'; +import type { LicensingPluginStart, LicensingPluginSetup } from '../../licensing/public'; +import type { DashboardStart } from '../../../../src/plugins/dashboard/public'; +import type { IndexPatternFieldEditorStart } from '../../../../src/plugins/data_view_field_editor/public'; export interface SetupPlugins { home?: HomePublicPluginSetup;