From 7d3d79e6a1c39228f738f52941943210e2723623 Mon Sep 17 00:00:00 2001 From: Spencer Date: Wed, 3 Nov 2021 21:02:56 -0600 Subject: [PATCH] [8.0] [eslint] enable type-specific lint rules (#114184) (#117444) * [eslint] enable type-specific lint rules (#114184) * [eslint] enable type-specific lint rules * autofix violations * duplicate eslint-disable to new export statement Co-authored-by: spalger Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/plugins/share/common/index.ts * autofix more types Co-authored-by: spalger --- .buildkite/pipelines/hourly.yml | 7 + .buildkite/pipelines/pull_request/base.yml | 7 + .buildkite/scripts/steps/lint_with_types.sh | 12 ++ .gitignore | 1 + examples/developer_examples/public/index.ts | 2 +- examples/embeddable_examples/common/index.ts | 5 +- examples/embeddable_examples/public/index.ts | 18 +- .../public/list_container/index.ts | 3 +- .../public/searchable_list_container/index.ts | 6 +- examples/locator_examples/public/index.ts | 4 +- examples/search_examples/public/index.ts | 2 +- examples/search_examples/server/index.ts | 2 +- package.json | 6 +- .../kbn-config-schema/src/duration/index.ts | 3 +- packages/kbn-config-schema/src/index.ts | 3 +- packages/kbn-config-schema/src/types/index.ts | 36 ++-- packages/kbn-config/src/index.ts | 19 +- packages/kbn-config/src/raw/index.ts | 3 +- .../kbn-dev-utils/src/proc_runner/errors.ts | 23 --- .../kbn-dev-utils/src/proc_runner/proc.ts | 8 +- .../src/proc_runner/proc_runner.ts | 8 +- .../kbn-dev-utils/src/tooling_log/index.ts | 6 +- packages/kbn-es-archiver/src/lib/index.ts | 3 +- packages/kbn-es-query/src/es_query/index.ts | 5 +- packages/kbn-es-query/src/filters/index.ts | 4 +- packages/kbn-es-query/src/kuery/index.ts | 2 +- .../src/kuery/node_types/index.ts | 2 +- packages/kbn-field-types/src/index.ts | 3 +- packages/kbn-interpreter/src/common/index.ts | 9 +- packages/kbn-logging/src/ecs/index.ts | 2 +- packages/kbn-logging/src/index.ts | 17 +- packages/kbn-logging/src/mocks/index.ts | 3 +- .../kbn-monaco/src/painless/worker/index.ts | 2 +- .../src/painless/worker/lib/index.ts | 2 +- packages/kbn-optimizer/src/optimizer/index.ts | 2 +- packages/kbn-pm/dist/index.js | 170 ++++++++++++----- packages/kbn-pm/src/utils/log.ts | 3 +- .../kbn-server-route-repository/src/index.ts | 2 +- packages/kbn-std/src/index.ts | 6 +- .../functional_test_runner/public_types.ts | 2 +- .../src/functional_tests/lib/index.ts | 3 +- packages/kbn-test/src/index.ts | 10 +- .../kbn-test/src/jest/utils/testbed/index.ts | 2 +- packages/kbn-utility-types/src/index.ts | 2 +- scripts/eslint_with_types.js | 10 + .../integration_tests/index.test.ts | 4 +- src/dev/eslint/index.ts | 1 + src/dev/eslint/run_eslint_with_types.ts | 171 ++++++++++++++++++ .../eslint/types.eslint.config.template.js | 27 +++ src/dev/i18n/index.ts | 8 +- src/dev/typescript/project.ts | 25 ++- src/plugins/advanced_settings/public/index.ts | 2 +- src/plugins/bfetch/public/batching/index.ts | 6 +- src/plugins/bfetch/public/index.ts | 4 +- src/plugins/bfetch/server/index.ts | 2 +- src/plugins/charts/common/index.ts | 12 +- .../charts/common/static/color_maps/index.ts | 10 +- src/plugins/charts/common/static/index.ts | 4 +- src/plugins/charts/public/index.ts | 16 +- .../charts/public/services/theme/theme.ts | 8 - src/plugins/charts/server/index.ts | 4 +- .../public/application/components/index.ts | 6 +- .../public/application/contexts/index.ts | 3 +- .../console/public/application/lib/index.ts | 3 +- src/plugins/console/public/services/index.ts | 3 +- src/plugins/console/public/types/index.ts | 4 +- src/plugins/console/server/index.ts | 2 +- .../components/replacement_card/index.ts | 3 +- .../custom_integrations/public/index.ts | 2 +- .../custom_integrations/server/index.ts | 2 +- src/plugins/dashboard/common/index.ts | 6 +- .../public/application/actions/index.ts | 47 ++--- .../public/application/embeddable/index.ts | 6 +- src/plugins/dashboard/public/index.ts | 15 +- src/plugins/dashboard/public/services/core.ts | 4 +- src/plugins/dashboard/public/services/home.ts | 3 +- .../dashboard/public/services/kibana_react.ts | 8 +- .../dashboard/public/services/kibana_utils.ts | 8 +- .../dashboard/public/services/navigation.ts | 2 +- .../public/services/presentation_util.ts | 8 +- .../public/services/saved_objects.ts | 12 +- .../dashboard/public/services/share.ts | 4 +- .../dashboard/public/services/spaces.ts | 2 +- .../dashboard/public/services/ui_actions.ts | 8 +- .../public/services/usage_collection.ts | 2 +- src/plugins/dashboard/public/types.ts | 2 +- src/plugins/dashboard/server/index.ts | 2 +- src/plugins/data/common/es_query/index.ts | 28 +-- src/plugins/data/common/index.ts | 10 +- .../data/common/kbn_field_types/types.ts | 3 +- src/plugins/data/common/search/aggs/types.ts | 16 +- src/plugins/data/public/actions/index.ts | 7 +- .../public/autocomplete/collectors/index.ts | 3 +- src/plugins/data/public/autocomplete/index.ts | 7 +- src/plugins/data/public/deprecated.ts | 5 +- src/plugins/data/public/index.ts | 29 ++- src/plugins/data/public/now_provider/index.ts | 7 +- .../data/public/query/query_string/index.ts | 3 +- .../data/public/query/saved_query/index.ts | 7 +- .../data/public/query/state_sync/index.ts | 2 +- .../data/public/query/timefilter/index.ts | 9 +- .../public/query/timefilter/timefilter.ts | 2 +- .../data/public/query/timefilter/types.ts | 2 +- src/plugins/data/public/search/aggs/types.ts | 2 +- .../data/public/search/collectors/index.ts | 3 +- src/plugins/data/public/search/index.ts | 31 ++-- .../public/search/search_interceptor/index.ts | 3 +- .../data/public/search/session/index.ts | 12 +- src/plugins/data/public/search/types.ts | 2 +- src/plugins/data/public/ui/index.ts | 8 +- .../data/public/ui/saved_query_form/index.ts | 3 +- .../data/public/ui/search_bar/index.tsx | 2 +- src/plugins/data/server/index.ts | 38 ++-- src/plugins/data/server/search/index.ts | 3 +- .../search/strategies/es_search/index.ts | 3 +- src/plugins/data_views/common/index.ts | 11 +- src/plugins/data_views/public/index.ts | 6 +- src/plugins/data_views/server/index.ts | 8 +- src/plugins/discover/public/index.ts | 12 +- .../discover/public/saved_searches/index.ts | 3 +- src/plugins/embeddable/public/index.ts | 52 +++--- .../public/lib/containers/i_container.ts | 2 +- .../embeddable/public/lib/containers/index.ts | 2 +- .../public/lib/embeddables/i_embeddable.ts | 2 +- .../public/lib/embeddables/index.ts | 9 +- .../reference_or_value_embeddable/index.ts | 3 +- .../public/lib/state_transfer/index.ts | 2 +- src/plugins/embeddable/public/lib/types.ts | 2 +- src/plugins/embeddable/server/index.ts | 4 +- .../authorization/components/index.ts | 2 +- .../authorization/index.ts | 4 +- src/plugins/es_ui_shared/common/index.ts | 5 +- .../public/authorization/index.ts | 10 +- .../public/components/cron_editor/index.ts | 2 +- .../components/cron_editor/services/index.ts | 9 +- .../public/components/json_editor/index.ts | 2 +- .../public/forms/form_wizard/index.ts | 6 +- .../public/forms/multi_content/index.ts | 3 +- src/plugins/es_ui_shared/public/index.ts | 19 +- .../es_ui_shared/public/request/index.ts | 6 +- .../static/forms/hook_form_lib/hooks/index.ts | 3 +- .../static/forms/hook_form_lib/lib/index.ts | 3 +- .../forms/hook_form_lib/shared_imports.ts | 4 +- .../expression_functions/specs/index.ts | 9 +- src/plugins/expressions/common/types/index.ts | 2 +- src/plugins/expressions/server/index.ts | 48 ++--- src/plugins/field_formats/common/index.ts | 5 +- src/plugins/field_formats/public/index.ts | 2 +- src/plugins/field_formats/server/index.ts | 2 +- .../public/components/index.ts | 6 +- .../public/shared_imports.ts | 19 +- .../public/test_utils/test_utils.ts | 3 +- .../client_integration/helpers/index.ts | 3 +- .../index_pattern_field_editor/kibana.json | 2 +- .../field_editor/form_fields/index.ts | 3 +- .../editors/default/index.ts | 3 +- .../components/field_format_editor/index.ts | 3 +- .../public/components/index.ts | 3 +- .../public/index.ts | 2 +- .../public/lib/index.ts | 10 +- .../public/shared_imports.ts | 18 +- .../index_pattern_management/public/index.ts | 2 +- .../common/adapters/request/index.ts | 3 +- src/plugins/inspector/common/index.ts | 11 +- src/plugins/inspector/public/index.ts | 3 +- src/plugins/kibana_overview/public/index.ts | 2 +- .../kibana_react/public/context/index.ts | 2 +- .../public/exit_full_screen_button/index.tsx | 3 +- src/plugins/kibana_react/public/index.ts | 3 +- .../public/page_template/index.ts | 3 +- .../page_template/solution_nav/index.ts | 15 +- .../public/validated_range/index.ts | 3 +- src/plugins/kibana_utils/common/index.ts | 3 +- .../common/state_containers/index.ts | 5 +- src/plugins/kibana_utils/index.ts | 3 +- src/plugins/kibana_utils/public/index.ts | 24 +-- .../public/state_management/url/index.ts | 2 +- .../kibana_utils/public/state_sync/index.ts | 17 +- .../state_sync_state_storage/index.ts | 11 +- .../kibana_utils/public/storage/index.ts | 2 +- src/plugins/kibana_utils/server/index.ts | 3 +- src/plugins/management/common/index.ts | 2 +- .../public/components/management_app/index.ts | 3 +- src/plugins/management/public/index.ts | 5 +- src/plugins/management/public/utils/index.ts | 6 +- src/plugins/maps_ems/public/index.ts | 2 +- src/plugins/navigation/public/index.ts | 5 +- .../navigation/public/top_nav_menu/index.ts | 11 +- src/plugins/newsfeed/public/index.ts | 9 +- .../controls/control_group/index.ts | 2 +- .../solution_toolbar/items/index.ts | 3 +- src/plugins/presentation_util/public/index.ts | 19 +- .../public/services/create/index.ts | 5 +- .../public/services/index.ts | 6 +- .../public/services/storybook/index.ts | 5 +- .../saved_objects/public/finder/index.ts | 8 +- src/plugins/saved_objects/public/index.ts | 35 ++-- .../saved_objects/public/save_modal/index.ts | 9 +- .../public/saved_object/decorators/index.ts | 9 +- .../helpers/field_mapping/index.ts | 2 +- .../public/saved_object/index.ts | 7 +- .../saved_objects_management/public/index.ts | 14 +- .../public/lib/index.ts | 10 +- .../public/services/index.ts | 15 +- .../public/services/types/index.ts | 4 +- .../saved_objects_management/public/types.ts | 2 +- .../saved_objects_management/server/index.ts | 2 +- .../server/services/index.ts | 3 +- .../saved_objects_management/server/types.ts | 2 +- .../saved_objects_tagging_oss/common/index.ts | 2 +- .../public/decorator/index.ts | 2 +- .../saved_objects_tagging_oss/public/index.ts | 6 +- src/plugins/screenshot_mode/public/index.ts | 2 +- src/plugins/screenshot_mode/server/index.ts | 2 +- src/plugins/share/common/index.ts | 3 +- .../common/url_service/locators/locator.ts | 2 - src/plugins/share/public/index.ts | 14 +- src/plugins/share/server/index.ts | 2 +- src/plugins/ui_actions/public/index.ts | 22 +-- .../public/components/options/index.ts | 6 +- .../vis_default_editor/public/index.ts | 3 +- src/plugins/vis_types/pie/public/index.ts | 2 +- src/plugins/vis_types/table/common/index.ts | 3 +- .../vis_types/timelion/public/index.ts | 2 +- .../vis_types/timelion/server/types.ts | 5 +- .../timeseries/common/types/index.ts | 4 +- .../lib/index_pattern_select/index.ts | 3 +- .../vis_types/timeseries/server/index.ts | 4 +- .../vega/public/vega_inspector/index.ts | 7 +- src/plugins/vis_types/vega/server/index.ts | 2 +- .../public/editor/components/common/index.ts | 3 +- .../xy/public/expression_functions/index.ts | 21 ++- src/plugins/vis_types/xy/public/index.ts | 7 +- src/plugins/visualizations/public/index.ts | 20 +- .../public/vis_types/types_service.ts | 2 +- src/plugins/visualizations/server/index.ts | 2 +- .../visualize/public/application/types.ts | 2 +- src/plugins/visualize/public/index.ts | 4 +- test/functional/services/common/index.ts | 3 +- .../kbn_tp_run_pipeline/public/index.ts | 2 +- .../kbn_tp_run_pipeline/public/types.ts | 3 +- .../plugins/core_plugin_a/server/index.ts | 2 +- .../reporting_example/common/index.ts | 9 +- .../reporting_example/public/index.ts | 2 +- .../dashboard_to_discover_drilldown/index.ts | 8 +- .../server/builtin_action_types/index.ts | 44 ++--- .../actions/server/lib/errors/index.ts | 3 +- x-pack/plugins/actions/server/lib/index.ts | 15 +- x-pack/plugins/actions/server/types.ts | 10 +- .../alerting/server/alert_instance/index.ts | 3 +- x-pack/plugins/alerting/server/index.ts | 6 +- .../alerting/server/lib/errors/index.ts | 6 +- x-pack/plugins/alerting/server/lib/index.ts | 8 +- .../alerting/server/routes/lib/index.ts | 6 +- .../apm_policy_form/typings.ts | 4 +- x-pack/plugins/apm/public/index.ts | 2 +- x-pack/plugins/apm/server/index.ts | 6 +- .../settings/apm_indices/get_apm_indices.ts | 2 +- x-pack/plugins/banners/common/index.ts | 2 +- .../expression_types/embeddable.ts | 3 +- x-pack/plugins/canvas/common/index.ts | 3 +- .../public/components/color_manager/index.ts | 3 +- .../public/components/color_picker/index.ts | 3 +- .../components/color_picker_popover/index.ts | 3 +- .../components/embeddable_flyout/index.ts | 6 +- .../public/components/paginate/index.tsx | 2 +- .../canvas/public/components/popover/index.ts | 3 +- .../components/saved_elements_modal/index.ts | 6 +- .../share_menu/flyout/flyout.tsx | 2 +- x-pack/plugins/canvas/public/index.ts | 2 +- x-pack/plugins/canvas/public/plugin.tsx | 2 +- .../canvas/public/routes/workpad/index.tsx | 3 +- .../canvas/public/services/legacy/index.ts | 2 +- x-pack/plugins/canvas/server/mocks/index.ts | 3 +- .../cases/public/common/shared_imports.ts | 22 ++- .../public/components/connectors/types.ts | 2 +- .../plugins/cases/public/components/types.ts | 2 +- .../public/containers/configure/types.ts | 2 +- x-pack/plugins/cases/server/client/index.ts | 2 +- .../plugins/cases/server/connectors/types.ts | 2 +- x-pack/plugins/cases/server/index.ts | 2 +- .../saved_object_types/migrations/index.ts | 3 +- x-pack/plugins/cases/server/services/index.ts | 3 +- x-pack/plugins/cloud/public/index.ts | 2 +- x-pack/plugins/cloud/server/index.ts | 2 +- .../drilldowns/dashboard_drilldown/index.ts | 2 +- .../dashboard_enhanced/public/index.ts | 6 +- .../components/index.ts | 6 +- .../abstract_dashboard_drilldown/index.ts | 8 +- .../actions/flyout_create_drilldown/index.ts | 7 +- .../actions/flyout_edit_drilldown/index.tsx | 7 +- .../index.ts | 6 +- .../dashboard_enhanced/server/index.ts | 2 +- x-pack/plugins/data_enhanced/public/index.ts | 2 +- .../search/sessions_mgmt/components/index.tsx | 3 +- .../index.ts | 6 +- .../components/combined_fields/index.ts | 2 +- .../document_count_chart/index.ts | 3 +- .../components/multi_select_picker/index.ts | 3 +- .../common/components/results_links/index.ts | 3 +- .../components/field_count_stats/index.ts | 10 +- .../metric_distribution_chart/index.ts | 3 +- .../common/components/stats_table/index.ts | 3 +- .../components/stats_table/types/index.ts | 7 +- .../components/import_progress/index.ts | 3 +- .../application/file_data_visualizer/index.ts | 3 +- .../public/application/index.ts | 7 +- .../full_time_range_selector/index.tsx | 3 +- .../index_data_visualizer_view/index.ts | 6 +- .../index_data_visualizer/index.ts | 3 +- .../plugins/data_visualizer/public/index.ts | 2 +- .../public/lazy_load_bundle/lazy/index.ts | 8 +- .../public/lib/url_drilldown.tsx | 1 - .../embeddable_enhanced/public/index.ts | 4 +- .../server/crypto/index.ts | 5 +- .../encrypted_saved_objects/server/index.ts | 7 +- .../public/applications/app_search/types.ts | 4 +- .../shared/flash_messages/index.ts | 2 +- .../applications/shared/layout/index.ts | 3 +- .../shared/react_router_helpers/index.ts | 6 +- .../components/shared/source_row/index.ts | 3 +- x-pack/plugins/event_log/server/es/index.ts | 3 +- x-pack/plugins/event_log/server/index.ts | 4 +- x-pack/plugins/event_log/server/types.ts | 5 +- x-pack/plugins/features/common/index.ts | 14 +- x-pack/plugins/features/public/index.ts | 6 +- x-pack/plugins/features/server/index.ts | 7 +- .../components/geojson_upload_form/index.ts | 2 +- .../public/importer/geojson_importer/index.ts | 3 +- x-pack/plugins/file_upload/public/index.ts | 6 +- x-pack/plugins/fleet/common/services/index.ts | 4 +- .../services/index.ts | 4 +- .../plugins/fleet/public/components/index.ts | 3 +- x-pack/plugins/fleet/public/hooks/index.ts | 6 +- x-pack/plugins/fleet/public/index.ts | 8 +- x-pack/plugins/fleet/public/layouts/index.ts | 3 +- x-pack/plugins/fleet/public/plugin.ts | 2 +- x-pack/plugins/fleet/public/services/index.ts | 8 +- x-pack/plugins/fleet/public/types/index.ts | 19 +- x-pack/plugins/fleet/server/index.ts | 8 +- .../fleet/server/services/epm/packages/get.ts | 3 +- .../server/services/epm/packages/index.ts | 11 +- x-pack/plugins/fleet/server/types/index.tsx | 16 +- x-pack/plugins/global_search/public/index.ts | 6 +- .../global_search/public/services/index.ts | 5 +- x-pack/plugins/global_search/server/index.ts | 4 +- .../global_search/server/services/index.ts | 3 +- .../public/search_syntax/index.ts | 2 +- .../public/suggestions/index.ts | 3 +- .../sections/edit_policy/form/index.ts | 7 +- .../sections/edit_policy/lib/index.ts | 10 +- .../public/index.ts | 3 +- .../public/shared_imports.ts | 14 +- .../server/shared_imports.ts | 2 +- .../client_integration/helpers/index.ts | 5 +- .../index_management/common/types/index.ts | 2 +- .../component_template_details/index.ts | 2 +- .../component_templates/shared_imports.ts | 16 +- .../public/application/components/index.ts | 3 +- .../components/index_templates/index.ts | 3 +- .../simulate_template/index.ts | 5 +- .../client_integration/helpers/index.ts | 5 +- .../fields/edit_field/index.ts | 7 +- .../components/mappings_editor/index.ts | 2 +- .../mappings_editor/shared_imports.ts | 31 ++-- .../components/shared/components/index.ts | 8 +- .../shared/components/wizard_steps/index.ts | 2 +- .../application/components/shared/index.ts | 2 +- .../public/application/index.tsx | 3 +- .../sections/home/components/index.ts | 3 +- .../plugins/index_management/public/index.ts | 2 +- .../index_management/public/services/index.ts | 3 +- .../index_management/public/shared_imports.ts | 12 +- .../plugins/index_management/server/index.ts | 8 +- .../index_management/server/services/index.ts | 3 +- .../infra/common/log_search_result/index.ts | 2 +- .../infra/common/log_search_summary/index.ts | 2 +- x-pack/plugins/infra/common/typed_json.ts | 2 +- .../initial_configuration_step/validation.tsx | 3 +- .../logging/log_text_stream/index.ts | 8 +- .../get_latest_categories_datasets_stats.ts | 2 +- .../containers/logs/log_analysis/index.ts | 2 +- .../log_analysis/log_analysis_module_types.ts | 2 +- .../containers/logs/log_source/log_source.ts | 4 +- .../containers/ml/infra_ml_module_types.ts | 2 +- .../infra/public/utils/loading_state/index.ts | 10 +- x-pack/plugins/infra/server/index.ts | 5 +- .../infra/server/lib/infra_ml/index.ts | 2 +- .../pipeline_editor/components/index.ts | 12 +- .../components/load_from_json/index.ts | 2 +- .../pipeline_processors_editor_item/index.ts | 2 +- .../index.ts | 3 +- .../components/processor_form/index.ts | 7 +- .../processor_form/processors/index.ts | 2 +- .../components/processors_tree/index.ts | 3 +- .../components/shared/index.ts | 7 +- .../test_pipeline/test_pipeline_tabs/index.ts | 3 +- .../pipeline_editor/context/index.ts | 10 +- .../components/pipeline_editor/index.ts | 9 +- .../processors_reducer/index.ts | 9 +- .../components/pipeline_editor/types.ts | 2 +- .../ingest_pipelines/public/shared_imports.ts | 38 ++-- x-pack/plugins/lens/public/index.ts | 2 +- .../indexpattern_datasource/indexpattern.tsx | 3 +- .../definitions/calculations/index.ts | 24 ++- .../operations/definitions/formula/index.ts | 6 +- .../operations/definitions/index.ts | 26 +-- .../operations/index.ts | 2 +- .../public/indexpattern_datasource/types.ts | 2 +- x-pack/plugins/lens/public/mocks/index.ts | 2 +- .../lens/public/shared_components/index.ts | 3 +- .../public/application/index.tsx | 2 +- .../license_management/public/index.ts | 2 +- x-pack/plugins/lists/server/index.ts | 2 +- .../maps/common/elasticsearch_util/index.ts | 3 +- x-pack/plugins/maps/common/index.ts | 2 +- x-pack/plugins/maps/public/actions/index.ts | 2 +- x-pack/plugins/maps/public/api/index.ts | 4 +- .../maps/public/classes/fields/agg/index.ts | 2 +- .../classes/layers/vector_layer/index.ts | 9 +- .../classes/sources/ems_file_source/index.ts | 3 +- .../classes/sources/es_search_source/index.ts | 3 +- .../classes/sources/term_join_source/index.ts | 2 +- .../tiled_single_layer_vector_source/index.ts | 2 +- .../edit_layer_panel/join_editor/index.ts | 2 +- .../public/routes/map_page/url_state/index.ts | 11 +- .../plugins/metrics_entities/server/index.ts | 2 +- x-pack/plugins/ml/common/index.ts | 2 +- x-pack/plugins/ml/common/license/index.ts | 2 +- x-pack/plugins/ml/common/util/errors/index.ts | 7 +- .../components/color_range_legend/index.ts | 2 +- .../application/components/data_grid/index.ts | 2 +- .../components/entity_cell/index.ts | 3 +- .../full_time_range_selector/index.tsx | 3 +- .../components/multi_select_picker/index.ts | 3 +- .../components/scatterplot_matrix/index.ts | 3 +- .../application/components/stats_bar/index.ts | 3 +- .../application/contexts/kibana/index.ts | 6 +- .../public/application/contexts/ml/index.ts | 3 +- .../data_frame_analytics/common/index.ts | 29 ++- .../components/expandable_section/index.ts | 7 +- .../exploration_page_wrapper/index.ts | 3 +- .../components/action_clone/index.ts | 7 +- .../components/analytics_list/common.ts | 4 +- .../hooks/use_create_analytics_form/index.ts | 4 +- .../reducers/explorer_reducer/index.ts | 3 +- .../application/explorer/reducers/index.ts | 8 +- .../jobs/new_job/common/chart_loader/index.ts | 3 +- .../jobs/new_job/common/components/index.ts | 3 +- .../jobs/new_job/common/job_creator/index.ts | 2 +- .../jobs/new_job/common/job_runner/index.ts | 3 +- .../new_job/common/job_validator/index.ts | 3 +- .../new_job/common/results_loader/index.ts | 3 +- .../advanced_detector_modal/index.tsx | 3 +- .../components/agg_select/index.ts | 3 +- .../ml/public/application/routing/index.ts | 3 +- .../toast_notification_service/index.ts | 2 +- x-pack/plugins/ml/public/index.ts | 3 +- .../plugins/ml/public/locator/ml_locator.ts | 2 +- .../ml/server/lib/capabilities/index.ts | 7 +- .../plugins/ml/server/lib/ml_client/index.ts | 2 +- .../ml/server/models/calendar/index.ts | 3 +- .../models/data_frame_analytics/types.ts | 2 +- .../ml/server/models/data_recognizer/index.ts | 3 +- .../plugins/ml/server/models/filter/index.ts | 3 +- .../plugins/ml/server/saved_objects/index.ts | 3 +- .../ml/server/shared_services/index.ts | 3 +- .../shared_services/license_checks/index.ts | 3 +- x-pack/plugins/monitoring/public/types.ts | 4 +- x-pack/plugins/monitoring/server/index.ts | 6 +- .../kibana_monitoring/collectors/index.ts | 3 +- .../server/lib/elasticsearch/nodes/index.ts | 3 +- .../monitoring/server/lib/metrics/index.ts | 6 +- x-pack/plugins/observability/public/index.ts | 9 +- .../services/call_observability_api/types.ts | 2 +- x-pack/plugins/observability/server/index.ts | 10 +- .../observability/server/routes/types.ts | 2 +- .../plugins/observability/typings/common.ts | 2 +- .../plugins/osquery/common/shared_imports.ts | 2 +- .../public/components/layouts/index.tsx | 3 +- .../plugins/osquery/public/shared_imports.ts | 22 ++- x-pack/plugins/osquery/server/index.ts | 2 +- .../client_integration/helpers/index.ts | 3 +- .../remote_clusters/common/lib/index.ts | 9 +- .../remote_cluster_form/validators/index.ts | 3 +- .../public/application/services/index.ts | 9 +- .../plugins/remote_clusters/public/index.ts | 2 +- .../plugins/remote_clusters/public/types.ts | 4 +- .../plugins/remote_clusters/server/index.ts | 2 +- .../reporting_panel_content/index.ts | 3 +- .../reporting/public/shared_imports.ts | 3 +- .../plugins/reporting/server/config/index.ts | 3 +- x-pack/plugins/reporting/server/index.ts | 4 +- .../reporting/server/lib/layouts/index.ts | 2 +- .../server/lib/screenshots/observable.ts | 2 +- .../reporting/server/lib/store/index.ts | 2 +- .../reporting/server/lib/store/report.ts | 4 +- .../reporting/server/lib/tasks/index.ts | 2 +- x-pack/plugins/reporting/server/types.ts | 2 +- x-pack/plugins/rule_registry/server/index.ts | 8 +- .../runtime_fields/public/components/index.ts | 9 +- .../index.ts | 6 +- .../components/runtime_field_form/index.ts | 3 +- x-pack/plugins/runtime_fields/public/index.ts | 10 +- .../runtime_fields/public/shared_imports.ts | 10 +- .../runtime_fields/public/test_utils.ts | 3 +- .../saved_objects_tagging/common/index.ts | 7 +- .../public/components/assign_flyout/index.ts | 4 +- .../public/components/base/index.ts | 12 +- .../public/components/edition_modal/index.ts | 3 +- .../public/components/index.ts | 7 +- .../saved_objects_tagging/public/index.ts | 4 +- .../public/management/actions/index.ts | 2 +- .../public/services/assignments/index.ts | 3 +- .../public/services/index.ts | 9 +- .../public/services/tags/index.ts | 9 +- .../public/services/tags/tags_cache.ts | 2 +- .../server/services/assignments/index.ts | 3 +- .../server/services/index.ts | 3 +- x-pack/plugins/searchprofiler/common/index.ts | 2 +- .../highlight_details_flyout/index.ts | 3 +- .../public/application/components/index.ts | 3 +- .../profile_query_editor/editor/index.ts | 3 +- .../components/profile_tree/index.ts | 2 +- .../public/application/store/index.ts | 5 +- .../security/common/licensing/index.ts | 5 +- x-pack/plugins/security/common/model/index.ts | 25 +-- .../security/public/authentication/index.ts | 4 +- x-pack/plugins/security/public/index.ts | 19 +- .../invalidate_provider/index.ts | 3 +- .../management/role_mappings/model/index.ts | 3 +- .../security/public/nav_control/index.ts | 3 +- .../security/server/anonymous_access/index.ts | 3 +- x-pack/plugins/security/server/audit/index.ts | 5 +- .../server/authentication/api_keys/index.ts | 4 +- .../security/server/authentication/index.ts | 4 +- .../server/authentication/providers/index.ts | 7 +- .../authorization/authorization_service.tsx | 2 +- .../security/server/authorization/index.ts | 11 +- .../feature_privilege_builder/index.ts | 4 +- .../server/authorization/privileges/index.ts | 3 +- .../server/authorization/roles/index.ts | 3 +- .../security/server/elasticsearch/index.ts | 4 +- .../security/server/feature_usage/index.ts | 6 +- x-pack/plugins/security/server/index.ts | 4 +- .../routes/authorization/roles/model/index.ts | 3 +- .../server/session_management/index.ts | 9 +- .../common/field_maps/index.ts | 3 +- .../public/common/containers/source/index.tsx | 2 +- .../public/common/store/routing/index.ts | 2 +- .../plugins/security_solution/public/index.ts | 3 +- .../components/policies_selector/index.ts | 3 +- .../components/search_exceptions/index.ts | 3 +- .../management/pages/endpoint_hosts/index.tsx | 2 +- .../policy/store/policy_details/index.ts | 2 +- .../components/logical_condition/index.ts | 3 +- .../overview/components/link_panel/index.ts | 2 +- .../public/resolver/store/camera/index.ts | 2 +- .../public/shared_imports.ts | 18 +- .../timeline/cell_rendering/index.tsx | 2 +- .../timelines/components/timeline/events.ts | 2 +- .../containers/local_storage/index.tsx | 2 +- .../plugins/security_solution/server/index.ts | 3 +- .../server/lib/machine_learning/index.ts | 2 +- .../security_solution/server/lib/types.ts | 2 +- .../security_solution/server/plugin.ts | 2 +- .../client_integration/helpers/index.ts | 3 +- .../public/application/components/index.ts | 12 +- .../public/application/index.tsx | 2 +- .../public/application/lib/index.ts | 4 +- .../application/services/validation/index.ts | 13 +- .../snapshot_restore/public/shared_imports.ts | 14 +- .../server/test/helpers/index.ts | 3 +- .../plugins/spaces/common/licensing/index.ts | 3 +- x-pack/plugins/spaces/public/index.ts | 2 +- x-pack/plugins/spaces/server/index.ts | 10 +- .../spaces/server/lib/copy_to_spaces/index.ts | 2 +- .../spaces/server/spaces_client/index.ts | 7 +- .../spaces/server/spaces_service/index.ts | 3 +- .../spaces/server/usage_stats/index.ts | 5 +- x-pack/plugins/stack_alerts/server/types.ts | 2 +- x-pack/plugins/task_manager/server/index.ts | 2 +- .../task_manager/server/monitoring/index.ts | 3 +- .../monitoring/monitoring_stats_stream.ts | 2 +- .../components/t_grid/body/sort/index.ts | 2 +- x-pack/plugins/timelines/public/index.ts | 4 +- x-pack/plugins/timelines/server/index.ts | 2 +- .../transform/common/shared_imports.ts | 2 +- .../transform/public/app/common/index.ts | 39 ++-- .../app/hooks/use_search_items/index.ts | 2 +- .../components/aggregation_list/index.ts | 6 +- .../step_define/common/filter_agg/index.ts | 2 +- .../components/step_define/common/index.ts | 10 +- .../components/step_define/index.ts | 4 +- .../components/step_details/index.ts | 7 +- .../components/stats_bar/index.ts | 3 +- .../transform/public/shared_imports.ts | 8 +- .../triggers_actions_ui/public/types.ts | 5 +- .../triggers_actions_ui/server/data/index.ts | 3 +- .../server/data/lib/index.ts | 4 +- .../server/data/lib/time_series_query.ts | 2 +- .../server/data/lib/time_series_types.ts | 2 +- .../server/data/routes/time_series_query.ts | 2 +- .../triggers_actions_ui/server/index.ts | 5 +- .../presentable_picker/presentable_picker.tsx | 2 +- .../components/trigger_picker/index.ts | 2 +- .../drilldown_manager/components/types.ts | 2 +- .../drilldown_manager/containers/index.ts | 3 +- .../state/drilldown_manager_state.ts | 2 - .../state/drilldown_state.ts | 2 - .../url_drilldown_collect_config/index.ts | 3 +- .../public/drilldowns/url_drilldown/index.ts | 2 +- .../public/dynamic_actions/types.ts | 2 +- .../ui_actions_enhanced/public/index.ts | 28 +-- .../ui_actions_service_enhancements.ts | 2 +- .../ui_actions_enhanced/server/index.ts | 6 +- .../ui_actions_enhanced/server/types.ts | 2 +- .../client_integration/helpers/index.ts | 9 +- .../reindex/flyout/index.tsx | 3 +- .../public/shared_imports.ts | 10 +- .../common/runtime_types/snapshot/index.ts | 3 +- .../components/common/higher_order/index.ts | 3 +- .../monitor/synthetics/waterfall/index.tsx | 5 +- .../alerts/alerts_containers/index.ts | 6 +- .../components/overview/monitor_list/index.ts | 2 +- .../plugins/uptime/public/contexts/index.ts | 7 +- .../plugins/uptime/public/lib/helper/index.ts | 3 +- .../public/lib/helper/url_params/index.ts | 3 +- .../uptime/server/lib/domains/index.ts | 3 +- .../client_integration/helpers/index.ts | 3 +- .../public/application/components/index.ts | 3 +- .../public/application/shared_imports.ts | 4 +- .../public/legacy/parse_es_interval/index.ts | 3 +- .../common/lib/index.ts | 3 +- .../management/snapshot_restore/lib/index.ts | 3 +- .../common/ftr_provider_context.ts | 2 +- .../services/app_search_service.ts | 2 +- .../common/ftr_provider_context.ts | 2 +- .../global_search_test/public/index.ts | 2 +- .../saved_object_tagging/common/lib/index.ts | 2 +- yarn.lock | 132 +++++++++----- 641 files changed, 2250 insertions(+), 1860 deletions(-) create mode 100755 .buildkite/scripts/steps/lint_with_types.sh delete mode 100644 packages/kbn-dev-utils/src/proc_runner/errors.ts create mode 100644 scripts/eslint_with_types.js create mode 100644 src/dev/eslint/run_eslint_with_types.ts create mode 100644 src/dev/eslint/types.eslint.config.template.js diff --git a/.buildkite/pipelines/hourly.yml b/.buildkite/pipelines/hourly.yml index b03a46b5b5c6..e6e683cc7500 100644 --- a/.buildkite/pipelines/hourly.yml +++ b/.buildkite/pipelines/hourly.yml @@ -147,6 +147,13 @@ steps: key: linting timeout_in_minutes: 90 + - command: .buildkite/scripts/steps/lint_with_types.sh + label: 'Linting (with types)' + agents: + queue: c2-16 + key: linting_with_types + timeout_in_minutes: 90 + - command: .buildkite/scripts/steps/checks.sh label: 'Checks' agents: diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index 1013a841dfd2..0f2a4a1026af 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -145,6 +145,13 @@ steps: key: linting timeout_in_minutes: 90 + - command: .buildkite/scripts/steps/lint_with_types.sh + label: 'Linting (with types)' + agents: + queue: c2-16 + key: linting_with_types + timeout_in_minutes: 90 + - command: .buildkite/scripts/steps/checks.sh label: 'Checks' agents: diff --git a/.buildkite/scripts/steps/lint_with_types.sh b/.buildkite/scripts/steps/lint_with_types.sh new file mode 100755 index 000000000000..81d5ef03f498 --- /dev/null +++ b/.buildkite/scripts/steps/lint_with_types.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +export BUILD_TS_REFS_DISABLE=false +.buildkite/scripts/bootstrap.sh + +echo '--- Lint: eslint (with types)' +checks-reporter-with-killswitch "Lint: eslint (with types)" \ + node scripts/eslint_with_types diff --git a/.gitignore b/.gitignore index c08ae529c2c3..cd79644e5d06 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ target .idea *.iml *.log +types.eslint.config.js # Ignore example plugin builds /examples/*/build diff --git a/examples/developer_examples/public/index.ts b/examples/developer_examples/public/index.ts index a6e5748765ab..8fcbda387abf 100644 --- a/examples/developer_examples/public/index.ts +++ b/examples/developer_examples/public/index.ts @@ -10,4 +10,4 @@ import { DeveloperExamplesPlugin } from './plugin'; export const plugin = () => new DeveloperExamplesPlugin(); -export { DeveloperExamplesSetup } from './plugin'; +export type { DeveloperExamplesSetup } from './plugin'; diff --git a/examples/embeddable_examples/common/index.ts b/examples/embeddable_examples/common/index.ts index bea814e5a3ed..4ff60ffb3afc 100644 --- a/examples/embeddable_examples/common/index.ts +++ b/examples/embeddable_examples/common/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { TodoSavedObjectAttributes } from './todo_saved_object_attributes'; -export { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from './book_saved_object_attributes'; +export type { TodoSavedObjectAttributes } from './todo_saved_object_attributes'; +export type { BookSavedObjectAttributes } from './book_saved_object_attributes'; +export { BOOK_SAVED_OBJECT } from './book_saved_object_attributes'; diff --git a/examples/embeddable_examples/public/index.ts b/examples/embeddable_examples/public/index.ts index 365c00155984..43d8db39692c 100644 --- a/examples/embeddable_examples/public/index.ts +++ b/examples/embeddable_examples/public/index.ts @@ -6,14 +6,16 @@ * Side Public License, v 1. */ +export type { HelloWorldEmbeddableFactory } from './hello_world'; export { HELLO_WORLD_EMBEDDABLE, HelloWorldEmbeddable, HelloWorldEmbeddableFactoryDefinition, - HelloWorldEmbeddableFactory, } from './hello_world'; -export { ListContainer, LIST_CONTAINER, ListContainerFactory } from './list_container'; -export { TODO_EMBEDDABLE, TodoEmbeddableFactory } from './todo'; +export type { ListContainerFactory } from './list_container'; +export { ListContainer, LIST_CONTAINER } from './list_container'; +export type { TodoEmbeddableFactory } from './todo'; +export { TODO_EMBEDDABLE } from './todo'; export { BOOK_EMBEDDABLE } from './book'; @@ -21,10 +23,8 @@ export { SIMPLE_EMBEDDABLE } from './migrations'; import { EmbeddableExamplesPlugin } from './plugin'; -export { - SearchableListContainer, - SEARCHABLE_LIST_CONTAINER, - SearchableListContainerFactory, -} from './searchable_list_container'; -export { MULTI_TASK_TODO_EMBEDDABLE, MultiTaskTodoEmbeddableFactory } from './multi_task_todo'; +export type { SearchableListContainerFactory } from './searchable_list_container'; +export { SearchableListContainer, SEARCHABLE_LIST_CONTAINER } from './searchable_list_container'; +export type { MultiTaskTodoEmbeddableFactory } from './multi_task_todo'; +export { MULTI_TASK_TODO_EMBEDDABLE } from './multi_task_todo'; export const plugin = () => new EmbeddableExamplesPlugin(); diff --git a/examples/embeddable_examples/public/list_container/index.ts b/examples/embeddable_examples/public/list_container/index.ts index cda0e55e59ee..299c3eeae42c 100644 --- a/examples/embeddable_examples/public/list_container/index.ts +++ b/examples/embeddable_examples/public/list_container/index.ts @@ -7,4 +7,5 @@ */ export { ListContainer, LIST_CONTAINER } from './list_container'; -export { ListContainerFactoryDefinition, ListContainerFactory } from './list_container_factory'; +export type { ListContainerFactory } from './list_container_factory'; +export { ListContainerFactoryDefinition } from './list_container_factory'; diff --git a/examples/embeddable_examples/public/searchable_list_container/index.ts b/examples/embeddable_examples/public/searchable_list_container/index.ts index 5448731abf2c..cea0154be812 100644 --- a/examples/embeddable_examples/public/searchable_list_container/index.ts +++ b/examples/embeddable_examples/public/searchable_list_container/index.ts @@ -7,7 +7,5 @@ */ export { SearchableListContainer, SEARCHABLE_LIST_CONTAINER } from './searchable_list_container'; -export { - SearchableListContainerFactoryDefinition, - SearchableListContainerFactory, -} from './searchable_list_container_factory'; +export type { SearchableListContainerFactory } from './searchable_list_container_factory'; +export { SearchableListContainerFactoryDefinition } from './searchable_list_container_factory'; diff --git a/examples/locator_examples/public/index.ts b/examples/locator_examples/public/index.ts index 50da3501805f..e71d6bf1e5b0 100644 --- a/examples/locator_examples/public/index.ts +++ b/examples/locator_examples/public/index.ts @@ -8,12 +8,12 @@ import { LocatorExamplesPlugin } from './plugin'; -export { +export type { HelloLocator, HelloLocatorV1Params, HelloLocatorV2Params, HelloLocatorParams, - HELLO_LOCATOR, } from './locator'; +export { HELLO_LOCATOR } from './locator'; export const plugin = () => new LocatorExamplesPlugin(); diff --git a/examples/search_examples/public/index.ts b/examples/search_examples/public/index.ts index fd557f752a38..c1361facc294 100644 --- a/examples/search_examples/public/index.ts +++ b/examples/search_examples/public/index.ts @@ -15,4 +15,4 @@ import { SearchExamplesPlugin } from './plugin'; export function plugin() { return new SearchExamplesPlugin(); } -export { SearchExamplesPluginSetup, SearchExamplesPluginStart } from './types'; +export type { SearchExamplesPluginSetup, SearchExamplesPluginStart } from './types'; diff --git a/examples/search_examples/server/index.ts b/examples/search_examples/server/index.ts index f351681a1041..75c23e8e8925 100644 --- a/examples/search_examples/server/index.ts +++ b/examples/search_examples/server/index.ts @@ -13,4 +13,4 @@ export function plugin(initializerContext: PluginInitializerContext) { return new SearchExamplesPlugin(initializerContext); } -export { SearchExamplesPluginSetup, SearchExamplesPluginStart } from './types'; +export type { SearchExamplesPluginSetup, SearchExamplesPluginStart } from './types'; diff --git a/package.json b/package.json index 71c9e567b365..a48ea99aeccf 100644 --- a/package.json +++ b/package.json @@ -633,9 +633,9 @@ "@types/xml2js": "^0.4.5", "@types/yauzl": "^2.9.1", "@types/zen-observable": "^0.8.0", - "@typescript-eslint/eslint-plugin": "^4.31.2", - "@typescript-eslint/parser": "^4.31.2", - "@typescript-eslint/typescript-estree": "^4.31.2", + "@typescript-eslint/eslint-plugin": "^5.2.0", + "@typescript-eslint/parser": "^5.2.0", + "@typescript-eslint/typescript-estree": "^5.2.0", "@yarnpkg/lockfile": "^1.1.0", "abab": "^2.0.4", "aggregate-error": "^3.1.0", diff --git a/packages/kbn-config-schema/src/duration/index.ts b/packages/kbn-config-schema/src/duration/index.ts index 6a05a00c9e87..1b1d47a24abd 100644 --- a/packages/kbn-config-schema/src/duration/index.ts +++ b/packages/kbn-config-schema/src/duration/index.ts @@ -7,7 +7,8 @@ */ import { Duration, duration as momentDuration, DurationInputArg2, isDuration } from 'moment'; -export { Duration, isDuration }; +export type { Duration }; +export { isDuration }; const timeFormatRegex = /^(0|[1-9][0-9]*)(ms|s|m|h|d|w|M|Y)$/; diff --git a/packages/kbn-config-schema/src/index.ts b/packages/kbn-config-schema/src/index.ts index 68500a18530b..8635421beb0a 100644 --- a/packages/kbn-config-schema/src/index.ts +++ b/packages/kbn-config-schema/src/index.ts @@ -49,7 +49,8 @@ import { StreamType, } from './types'; -export { ObjectType, TypeOf, Type, Props, NullableProps }; +export type { TypeOf, Props, NullableProps }; +export { ObjectType, Type }; export { ByteSizeValue } from './byte_size_value'; export { SchemaTypeError, ValidationError } from './errors'; export { isConfigSchema } from './typeguards'; diff --git a/packages/kbn-config-schema/src/types/index.ts b/packages/kbn-config-schema/src/types/index.ts index d4098a2abf35..5152137985ff 100644 --- a/packages/kbn-config-schema/src/types/index.ts +++ b/packages/kbn-config-schema/src/types/index.ts @@ -6,23 +6,35 @@ * Side Public License, v 1. */ -export { Type, TypeOptions } from './type'; +export type { TypeOptions } from './type'; +export { Type } from './type'; export { AnyType } from './any_type'; -export { ArrayOptions, ArrayType } from './array_type'; +export type { ArrayOptions } from './array_type'; +export { ArrayType } from './array_type'; export { BooleanType } from './boolean_type'; export { BufferType } from './buffer_type'; -export { ByteSizeOptions, ByteSizeType } from './byte_size_type'; -export { ConditionalType, ConditionalTypeValue } from './conditional_type'; -export { DurationOptions, DurationType } from './duration_type'; +export type { ByteSizeOptions } from './byte_size_type'; +export { ByteSizeType } from './byte_size_type'; +export type { ConditionalTypeValue } from './conditional_type'; +export { ConditionalType } from './conditional_type'; +export type { DurationOptions } from './duration_type'; +export { DurationType } from './duration_type'; export { LiteralType } from './literal_type'; export { MaybeType } from './maybe_type'; -export { MapOfOptions, MapOfType } from './map_type'; -export { NumberOptions, NumberType } from './number_type'; -export { ObjectType, ObjectTypeOptions, Props, NullableProps, TypeOf } from './object_type'; -export { RecordOfOptions, RecordOfType } from './record_type'; +export type { MapOfOptions } from './map_type'; +export { MapOfType } from './map_type'; +export type { NumberOptions } from './number_type'; +export { NumberType } from './number_type'; +export type { ObjectTypeOptions, Props, NullableProps, TypeOf } from './object_type'; +export { ObjectType } from './object_type'; +export type { RecordOfOptions } from './record_type'; +export { RecordOfType } from './record_type'; export { StreamType } from './stream_type'; -export { StringOptions, StringType } from './string_type'; +export type { StringOptions } from './string_type'; +export { StringType } from './string_type'; export { UnionType } from './union_type'; -export { URIOptions, URIType } from './uri_type'; +export type { URIOptions } from './uri_type'; +export { URIType } from './uri_type'; export { NeverType } from './never_type'; -export { IpType, IpOptions } from './ip_type'; +export type { IpOptions } from './ip_type'; +export { IpType } from './ip_type'; diff --git a/packages/kbn-config/src/index.ts b/packages/kbn-config/src/index.ts index 0068fc87855b..272ee7598570 100644 --- a/packages/kbn-config/src/index.ts +++ b/packages/kbn-config/src/index.ts @@ -19,16 +19,15 @@ export type { export { applyDeprecations, configDeprecationFactory } from './deprecation'; -export { - RawConfigurationProvider, - RawConfigService, - RawConfigAdapter, - getConfigFromFiles, -} from './raw'; +export type { RawConfigurationProvider, RawConfigAdapter } from './raw'; +export { RawConfigService, getConfigFromFiles } from './raw'; -export { ConfigService, IConfigService, ConfigValidateParameters } from './config_service'; -export { Config, ConfigPath, isConfigPath, hasConfigPathIntersection } from './config'; +export type { IConfigService, ConfigValidateParameters } from './config_service'; +export { ConfigService } from './config_service'; +export type { Config, ConfigPath } from './config'; +export { isConfigPath, hasConfigPathIntersection } from './config'; export { ObjectToConfigAdapter } from './object_to_config_adapter'; -export { CliArgs, Env, RawPackageInfo } from './env'; -export { EnvironmentMode, PackageInfo } from './types'; +export type { CliArgs, RawPackageInfo } from './env'; +export { Env } from './env'; +export type { EnvironmentMode, PackageInfo } from './types'; export { getPluginSearchPaths } from './plugins'; diff --git a/packages/kbn-config/src/raw/index.ts b/packages/kbn-config/src/raw/index.ts index 01ad83728aa0..be0a206e16b6 100644 --- a/packages/kbn-config/src/raw/index.ts +++ b/packages/kbn-config/src/raw/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { RawConfigService, RawConfigurationProvider, RawConfigAdapter } from './raw_config_service'; +export type { RawConfigurationProvider, RawConfigAdapter } from './raw_config_service'; +export { RawConfigService } from './raw_config_service'; export { getConfigFromFiles } from './read_config'; diff --git a/packages/kbn-dev-utils/src/proc_runner/errors.ts b/packages/kbn-dev-utils/src/proc_runner/errors.ts deleted file mode 100644 index d4d252476b76..000000000000 --- a/packages/kbn-dev-utils/src/proc_runner/errors.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -const $isCliError = Symbol('isCliError'); - -interface CliError extends Error { - [$isCliError]: boolean; -} - -export function createCliError(message: string) { - const error: Partial = new Error(message); - error[$isCliError] = true; - return error as CliError; -} - -export function isCliError(error: any): error is CliError { - return error && !!error[$isCliError]; -} diff --git a/packages/kbn-dev-utils/src/proc_runner/proc.ts b/packages/kbn-dev-utils/src/proc_runner/proc.ts index c9a520de6eb4..8238e2941330 100644 --- a/packages/kbn-dev-utils/src/proc_runner/proc.ts +++ b/packages/kbn-dev-utils/src/proc_runner/proc.ts @@ -19,7 +19,7 @@ const treeKillAsync = promisify((...args: [number, string, any]) => treeKill(... import { ToolingLog } from '../tooling_log'; import { observeLines } from '../stdio'; -import { createCliError } from './errors'; +import { createFailError } from '../run'; const SECOND = 1000; const STOP_TIMEOUT = 30 * SECOND; @@ -57,7 +57,7 @@ export type Proc = ReturnType; export function startProc(name: string, options: ProcOptions, log: ToolingLog) { const { cmd, args, cwd, env, stdin } = options; - log.info('[%s] > %s', name, cmd, args.join(' ')); + log.info('[%s] > %s', name, cmd === process.execPath ? 'node' : cmd, args.join(' ')); // spawn fails with ENOENT when either the // cmd or cwd don't exist, so we check for the cwd @@ -97,7 +97,9 @@ export function startProc(name: string, options: ProcOptions, log: ToolingLog) { } // JVM exits with 143 on SIGTERM and 130 on SIGINT, dont' treat then as errors if (code > 0 && !(code === 143 || code === 130)) { - throw createCliError(`[${name}] exited with code ${code}`); + throw createFailError(`[${name}] exited with code ${code}`, { + exitCode: code, + }); } return code; diff --git a/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts b/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts index 8ef32411621f..cb2ac2604e03 100644 --- a/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts +++ b/packages/kbn-dev-utils/src/proc_runner/proc_runner.ts @@ -11,7 +11,7 @@ import { filter, first, catchError, map } from 'rxjs/operators'; import exitHook from 'exit-hook'; import { ToolingLog } from '../tooling_log'; -import { createCliError } from './errors'; +import { createFailError } from '../run'; import { Proc, ProcOptions, startProc } from './proc'; const SECOND = 1000; @@ -61,7 +61,6 @@ export class ProcRunner { */ async run(name: string, options: RunOptions) { const { - cmd, args = [], cwd = process.cwd(), stdin = undefined, @@ -69,6 +68,7 @@ export class ProcRunner { waitTimeout = 15 * MINUTE, env = process.env, } = options; + const cmd = options.cmd === 'node' ? process.execPath : options.cmd; if (this.closing) { throw new Error('ProcRunner is closing'); @@ -99,7 +99,7 @@ export class ProcRunner { first(), catchError((err) => { if (err.name !== 'EmptyError') { - throw createCliError(`[${name}] exited without matching pattern: ${wait}`); + throw createFailError(`[${name}] exited without matching pattern: ${wait}`); } else { throw err; } @@ -110,7 +110,7 @@ export class ProcRunner { : Rx.timer(waitTimeout).pipe( map(() => { const sec = waitTimeout / SECOND; - throw createCliError( + throw createFailError( `[${name}] failed to match pattern within ${sec} seconds [pattern=${wait}]` ); }) diff --git a/packages/kbn-dev-utils/src/tooling_log/index.ts b/packages/kbn-dev-utils/src/tooling_log/index.ts index 4da54ee9bfea..2c7216c87c41 100644 --- a/packages/kbn-dev-utils/src/tooling_log/index.ts +++ b/packages/kbn-dev-utils/src/tooling_log/index.ts @@ -8,8 +8,10 @@ export { ToolingLog } from './tooling_log'; export type { ToolingLogOptions } from './tooling_log'; -export { ToolingLogTextWriter, ToolingLogTextWriterConfig } from './tooling_log_text_writer'; -export { pickLevelFromFlags, parseLogLevel, LogLevel, ParsedLogLevel } from './log_levels'; +export type { ToolingLogTextWriterConfig } from './tooling_log_text_writer'; +export { ToolingLogTextWriter } from './tooling_log_text_writer'; +export type { LogLevel, ParsedLogLevel } from './log_levels'; +export { pickLevelFromFlags, parseLogLevel } from './log_levels'; export { ToolingLogCollectingWriter } from './tooling_log_collecting_writer'; export type { Writer } from './writer'; export type { Message } from './message'; diff --git a/packages/kbn-es-archiver/src/lib/index.ts b/packages/kbn-es-archiver/src/lib/index.ts index 0e47294909ad..ee37591e1f2c 100644 --- a/packages/kbn-es-archiver/src/lib/index.ts +++ b/packages/kbn-es-archiver/src/lib/index.ts @@ -20,7 +20,8 @@ export { export { createFilterRecordsStream } from './records'; -export { createStats, Stats } from './stats'; +export type { Stats } from './stats'; +export { createStats } from './stats'; export { isGzip, diff --git a/packages/kbn-es-query/src/es_query/index.ts b/packages/kbn-es-query/src/es_query/index.ts index 8045b625cd92..192834c9fd48 100644 --- a/packages/kbn-es-query/src/es_query/index.ts +++ b/packages/kbn-es-query/src/es_query/index.ts @@ -7,11 +7,12 @@ */ export { migrateFilter } from './migrate_filter'; -export { buildEsQuery, EsQueryConfig } from './build_es_query'; +export type { EsQueryConfig } from './build_es_query'; +export { buildEsQuery } from './build_es_query'; export { buildQueryFromFilters } from './from_filters'; export { luceneStringToDsl } from './lucene_string_to_dsl'; export { decorateQuery } from './decorate_query'; -export { +export type { IndexPatternBase, IndexPatternFieldBase, IFieldSubType, diff --git a/packages/kbn-es-query/src/filters/index.ts b/packages/kbn-es-query/src/filters/index.ts index 21011db9462c..c202892cd9c3 100644 --- a/packages/kbn-es-query/src/filters/index.ts +++ b/packages/kbn-es-query/src/filters/index.ts @@ -6,12 +6,12 @@ * Side Public License, v 1. */ +export type { FilterCompareOptions } from './helpers'; export { dedupFilters, uniqFilters, compareFilters, COMPARE_ALL_OPTIONS, - FilterCompareOptions, cleanFilter, isFilter, isFilters, @@ -53,7 +53,7 @@ export { getFilterParams, } from './build_filters'; -export { +export type { Query, Filter, LatLon, diff --git a/packages/kbn-es-query/src/kuery/index.ts b/packages/kbn-es-query/src/kuery/index.ts index 6e03b3cb18f4..868904125dc4 100644 --- a/packages/kbn-es-query/src/kuery/index.ts +++ b/packages/kbn-es-query/src/kuery/index.ts @@ -23,4 +23,4 @@ export const toElasticsearchQuery = (...params: Parameters index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + } + } + + if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { + closeCurlyIndex = str.indexOf('}', index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { + return true; + } + } + } + + if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { + closeParenIndex = str.indexOf(')', index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + + if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { + if (pipeIndex < index) { + pipeIndex = str.indexOf('|', index); + } + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { + closeParenIndex = str.indexOf(')', pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf('\\', pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +var relaxedCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { + return true; + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; module.exports = function isGlob(str, options) { if (typeof str !== 'string' || str === '') { @@ -22209,32 +22309,14 @@ module.exports = function isGlob(str, options) { return true; } - var regex = strictRegex; - var match; + var check = strictCheck; - // optionally relax regex + // optionally relax check if (options && options.strict === false) { - regex = relaxedRegex; + check = relaxedCheck; } - while ((match = regex.exec(str))) { - if (match[2]) return true; - var idx = match.index + match[0].length; - - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - var open = match[1]; - var close = open ? chars[open] : null; - if (open && close) { - var n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - - str = str.slice(idx); - } - return false; + return check(str); }; diff --git a/packages/kbn-pm/src/utils/log.ts b/packages/kbn-pm/src/utils/log.ts index 9dbfad289579..ba4ee6941f54 100644 --- a/packages/kbn-pm/src/utils/log.ts +++ b/packages/kbn-pm/src/utils/log.ts @@ -38,4 +38,5 @@ class Log extends ToolingLog { } export const log = new Log(); -export { LogLevel, Log }; +export type { LogLevel }; +export { Log }; diff --git a/packages/kbn-server-route-repository/src/index.ts b/packages/kbn-server-route-repository/src/index.ts index 23621c5b213b..1cc7bd0fdeeb 100644 --- a/packages/kbn-server-route-repository/src/index.ts +++ b/packages/kbn-server-route-repository/src/index.ts @@ -12,7 +12,7 @@ export { formatRequest } from './format_request'; export { parseEndpoint } from './parse_endpoint'; export { decodeRequestParams } from './decode_request_params'; export { routeValidationObject } from './route_validation_object'; -export { +export type { RouteRepositoryClient, ReturnOf, EndpointOf, diff --git a/packages/kbn-std/src/index.ts b/packages/kbn-std/src/index.ts index 33b40c20039f..66fb98888444 100644 --- a/packages/kbn-std/src/index.ts +++ b/packages/kbn-std/src/index.ts @@ -7,13 +7,15 @@ */ export { assertNever } from './assert_never'; -export { deepFreeze, Freezable } from './deep_freeze'; +export type { Freezable } from './deep_freeze'; +export { deepFreeze } from './deep_freeze'; export { get } from './get'; export { mapToObject } from './map_to_object'; export { merge } from './merge'; export { pick } from './pick'; export { withTimeout, isPromise } from './promise'; -export { isRelativeUrl, modifyUrl, getUrlOrigin, URLMeaningfulParts } from './url'; +export type { URLMeaningfulParts } from './url'; +export { isRelativeUrl, modifyUrl, getUrlOrigin } from './url'; export { unset } from './unset'; export { getFlattenedObject } from './get_flattened_object'; export { ensureNoUnsafeProperties } from './ensure_no_unsafe_properties'; diff --git a/packages/kbn-test/src/functional_test_runner/public_types.ts b/packages/kbn-test/src/functional_test_runner/public_types.ts index d94f61e23b8b..d1a0f7998b0a 100644 --- a/packages/kbn-test/src/functional_test_runner/public_types.ts +++ b/packages/kbn-test/src/functional_test_runner/public_types.ts @@ -103,4 +103,4 @@ export interface FtrConfigProviderContext { readConfigFile(path: string): Promise; } -export { Test, Suite }; +export type { Test, Suite }; diff --git a/packages/kbn-test/src/functional_tests/lib/index.ts b/packages/kbn-test/src/functional_tests/lib/index.ts index 93700a692dc8..bf2cc4315952 100644 --- a/packages/kbn-test/src/functional_tests/lib/index.ts +++ b/packages/kbn-test/src/functional_tests/lib/index.ts @@ -8,6 +8,7 @@ export { runKibanaServer } from './run_kibana_server'; export { runElasticsearch } from './run_elasticsearch'; -export { runFtr, hasTests, assertNoneExcluded, CreateFtrOptions, CreateFtrParams } from './run_ftr'; +export type { CreateFtrOptions, CreateFtrParams } from './run_ftr'; +export { runFtr, hasTests, assertNoneExcluded } from './run_ftr'; export { KIBANA_ROOT, KIBANA_FTR_SCRIPT, FUNCTIONAL_CONFIG_PATH, API_CONFIG_PATH } from './paths'; export { runCli } from './run_cli'; diff --git a/packages/kbn-test/src/index.ts b/packages/kbn-test/src/index.ts index 0ef9fbfed07a..29e7e775ec17 100644 --- a/packages/kbn-test/src/index.ts +++ b/packages/kbn-test/src/index.ts @@ -25,14 +25,8 @@ export { runTests, startServers } from './functional_tests/tasks'; // @internal export { KIBANA_ROOT } from './functional_tests/lib/paths'; -export { - esTestConfig, - createTestEsCluster, - CreateTestEsClusterOptions, - EsTestCluster, - ICluster, - convertToKibanaClient, -} from './es'; +export type { CreateTestEsClusterOptions, EsTestCluster, ICluster } from './es'; +export { esTestConfig, createTestEsCluster, convertToKibanaClient } from './es'; export { kbnTestConfig, kibanaServerTestUser, kibanaTestUser, adminTestUser } from './kbn'; diff --git a/packages/kbn-test/src/jest/utils/testbed/index.ts b/packages/kbn-test/src/jest/utils/testbed/index.ts index 7abd4f000ab5..dfa5f011853c 100644 --- a/packages/kbn-test/src/jest/utils/testbed/index.ts +++ b/packages/kbn-test/src/jest/utils/testbed/index.ts @@ -7,4 +7,4 @@ */ export { registerTestBed } from './testbed'; -export { TestBed, TestBedConfig, SetupFunc, UnwrapPromise } from './types'; +export type { TestBed, TestBedConfig, SetupFunc, UnwrapPromise } from './types'; diff --git a/packages/kbn-utility-types/src/index.ts b/packages/kbn-utility-types/src/index.ts index 921f056c6b75..92aa8d7ecc98 100644 --- a/packages/kbn-utility-types/src/index.ts +++ b/packages/kbn-utility-types/src/index.ts @@ -7,7 +7,7 @@ */ import { PromiseType } from 'utility-types'; -export { $Values, Assign, Class, Optional, Required } from 'utility-types'; +export type { $Values, Assign, Class, Optional, Required } from 'utility-types'; export type { JsonArray, diff --git a/scripts/eslint_with_types.js b/scripts/eslint_with_types.js new file mode 100644 index 000000000000..e0371bc53217 --- /dev/null +++ b/scripts/eslint_with_types.js @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +require('../src/setup_node_env'); +require('../src/dev/eslint').runEslintWithTypes(); diff --git a/src/core/server/ui_settings/integration_tests/index.test.ts b/src/core/server/ui_settings/integration_tests/index.test.ts index 44d98afdf54f..ef635e90dac7 100644 --- a/src/core/server/ui_settings/integration_tests/index.test.ts +++ b/src/core/server/ui_settings/integration_tests/index.test.ts @@ -20,9 +20,9 @@ describe('uiSettings/routes', function () { jest.setTimeout(120_000); beforeAll(startServers); - /* eslint-disable jest/valid-describe */ + // eslint-disable-next-line jest/valid-describe describe('doc missing', docMissingSuite(savedObjectIndex)); + // eslint-disable-next-line jest/valid-describe describe('doc exists', docExistsSuite(savedObjectIndex)); - /* eslint-enable jest/valid-describe */ afterAll(stopServers); }); diff --git a/src/dev/eslint/index.ts b/src/dev/eslint/index.ts index 765c7dfce9ed..5aeb83c45ad0 100644 --- a/src/dev/eslint/index.ts +++ b/src/dev/eslint/index.ts @@ -8,3 +8,4 @@ export { pickFilesToLint } from './pick_files_to_lint'; export { lintFiles } from './lint_files'; +export { runEslintWithTypes } from './run_eslint_with_types'; diff --git a/src/dev/eslint/run_eslint_with_types.ts b/src/dev/eslint/run_eslint_with_types.ts new file mode 100644 index 000000000000..750011dea103 --- /dev/null +++ b/src/dev/eslint/run_eslint_with_types.ts @@ -0,0 +1,171 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import Path from 'path'; +import Fs from 'fs'; +import Os from 'os'; + +import execa from 'execa'; +import * as Rx from 'rxjs'; +import { mergeMap, reduce } from 'rxjs/operators'; +import { supportsColor } from 'chalk'; +import { REPO_ROOT, run, createFailError } from '@kbn/dev-utils'; +import { lastValueFrom } from '@kbn/std'; + +import { PROJECTS } from '../typescript/projects'; +import { Project } from '../typescript/project'; + +export function runEslintWithTypes() { + run( + async ({ log, flags }) => { + const eslintPath = require.resolve('eslint/bin/eslint'); + const ignoreFilePath = Path.resolve(REPO_ROOT, '.eslintignore'); + const configTemplate = Fs.readFileSync( + Path.resolve(__dirname, 'types.eslint.config.template.js'), + 'utf8' + ); + + const projectFilter = + flags.project && typeof flags.project === 'string' + ? Path.resolve(flags.project) + : undefined; + + const projects = PROJECTS.filter((project) => { + if (project.disableTypeCheck) { + log.verbose(`[${project.name}] skipping project with type checking disabled`); + return false; + } + + if (projectFilter && project.tsConfigPath !== projectFilter) { + log.verbose(`[${project.name}] skipping because it doesn't match --project`); + return false; + } + + return true; + }); + + if (!projects.length) { + if (projectFilter) { + throw createFailError(`[${projectFilter}] is not a valid tsconfig project`); + } + + throw createFailError('unable to find projects to lint'); + } + + const concurrency = Math.max(1, Math.round((Os.cpus() || []).length / 2) || 1) || 1; + log.info(`Linting ${projects.length} projects, ${concurrency} at a time`); + + const failures = await lastValueFrom( + Rx.from(projects).pipe( + mergeMap(async (project) => { + const configFilePath = Path.resolve(project.directory, 'types.eslint.config.js'); + + Fs.writeFileSync( + configFilePath, + configTemplate.replace( + `'{PACKAGE_CONFIG}'`, + JSON.stringify(JSON.stringify({ rootDir: project.directory })) + ), + 'utf8' + ); + + const proc = await execa( + process.execPath, + [ + Path.relative(project.directory, eslintPath), + ...project.getIncludePatterns().map((p) => (p.endsWith('*') ? `${p}.{ts,tsx}` : p)), + ...project.getExcludePatterns().flatMap((p) => ['--ignore-pattern', p]), + ...['--ignore-pattern', '**/*.json'], + ...['--ext', '.ts,.tsx'], + '--no-error-on-unmatched-pattern', + '--no-inline-config', + '--no-eslintrc', + ...['--config', Path.relative(project.directory, configFilePath)], + ...['--ignore-path', Path.relative(project.directory, ignoreFilePath)], + ...(flags.verbose ? ['--debug'] : []), + ...(flags.fix ? ['--fix'] : []), + ], + { + cwd: project.directory, + env: { + ...(supportsColor ? { FORCE_COLOR: 'true' } : {}), + ...process.env, + }, + buffer: true, + all: true, + reject: false, + } + ); + + if (proc.exitCode === 0) { + Fs.unlinkSync(configFilePath); + log.success(project.name); + return undefined; + } else { + log.error(`${project.name} failed`); + log.indent(4); + log.write(proc.all); + log.indent(-4); + return project; + } + }, concurrency), + reduce((acc: Project[], project) => { + if (project) { + return [...acc, project]; + } else { + return acc; + } + }, []) + ) + ); + + if (!failures.length) { + log.success(`All projects validated successfully!`); + if (flags.fix) { + log.info(` +❗️ After staging your changes, don't forget to run eslint/prettier on them with: + + node scripts/precommit_hook --fix +`); + } + + return; + } + + throw createFailError( + ` + ${ + failures.length + } projects failed, run the following commands locally to try auto-fixing them: + + ${failures + .map( + (p) => + `node scripts/eslint_with_types --fix --project ${Path.relative( + REPO_ROOT, + p.tsConfigPath + )}` + ) + .join('\n ')} + ` + ); + }, + { + description: + 'Run ESLint in each TS project, feeding it the TS config so it can validate our code using the type information', + flags: { + string: ['project'], + boolean: ['fix'], + help: ` + --project Only run eslint on a specific ts project + --fix Run eslint in --fix mode + `, + }, + } + ); +} diff --git a/src/dev/eslint/types.eslint.config.template.js b/src/dev/eslint/types.eslint.config.template.js new file mode 100644 index 000000000000..08cbaf3b0232 --- /dev/null +++ b/src/dev/eslint/types.eslint.config.template.js @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * THIS FILE IS WRITTEN AUTOMATICALLY by `node scripts/eslint_with_types` and + * should be deleted automatically unless something goes wrong + */ + +const config = JSON.parse('{PACKAGE_CONFIG}'); + +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: config.rootDir, + project: ['./tsconfig.json'], + }, + plugins: ['@typescript-eslint'], + rules: { + '@typescript-eslint/consistent-type-exports': 'error', + }, +}; diff --git a/src/dev/i18n/index.ts b/src/dev/i18n/index.ts index 111dc6b688e9..54ea36a9f82c 100644 --- a/src/dev/i18n/index.ts +++ b/src/dev/i18n/index.ts @@ -12,10 +12,6 @@ export { extractMessagesFromPathToMap } from './extract_default_translations'; export { matchEntriesWithExctractors } from './extract_default_translations'; export { arrayify, writeFileAsync, readFileAsync, normalizePath, ErrorReporter } from './utils'; export { serializeToJson, serializeToJson5 } from './serializers'; -export { - I18nConfig, - filterConfigPaths, - assignConfigFromPath, - checkConfigNamespacePrefix, -} from './config'; +export type { I18nConfig } from './config'; +export { filterConfigPaths, assignConfigFromPath, checkConfigNamespacePrefix } from './config'; export { integrateLocaleFiles } from './integrate_locale_files'; diff --git a/src/dev/typescript/project.ts b/src/dev/typescript/project.ts index a0c196dd8e91..baeaf39ec288 100644 --- a/src/dev/typescript/project.ts +++ b/src/dev/typescript/project.ts @@ -66,8 +66,10 @@ export class Project { const disableTypeCheck = projectOptions?.disableTypeCheck || false; const name = projectOptions?.name || Path.relative(REPO_ROOT, directory) || Path.basename(directory); - const include = config.include ? makeMatchers(directory, config.include) : undefined; - const exclude = config.exclude ? makeMatchers(directory, config.exclude) : undefined; + const includePatterns = config.include; + const include = includePatterns ? makeMatchers(directory, includePatterns) : undefined; + const excludePatterns = config.exclude; + const exclude = excludePatterns ? makeMatchers(directory, excludePatterns) : undefined; let baseProject; if (config.extends) { @@ -99,7 +101,9 @@ export class Project { disableTypeCheck, baseProject, include, - exclude + includePatterns, + exclude, + excludePatterns ); cache.set(tsConfigPath, project); return project; @@ -114,9 +118,22 @@ export class Project { public readonly baseProject?: Project, private readonly include?: IMinimatch[], - private readonly exclude?: IMinimatch[] + private readonly includePatterns?: string[], + private readonly exclude?: IMinimatch[], + private readonly excludePatterns?: string[] ) {} + public getIncludePatterns(): string[] { + return this.includePatterns + ? this.includePatterns + : this.baseProject?.getIncludePatterns() ?? []; + } + public getExcludePatterns(): string[] { + return this.excludePatterns + ? this.excludePatterns + : this.baseProject?.getExcludePatterns() ?? []; + } + private getInclude(): IMinimatch[] { return this.include ? this.include : this.baseProject?.getInclude() ?? []; } diff --git a/src/plugins/advanced_settings/public/index.ts b/src/plugins/advanced_settings/public/index.ts index be57576d176c..83676b4f7c38 100644 --- a/src/plugins/advanced_settings/public/index.ts +++ b/src/plugins/advanced_settings/public/index.ts @@ -9,7 +9,7 @@ import React from 'react'; import { PluginInitializerContext } from 'kibana/public'; import { AdvancedSettingsPlugin } from './plugin'; -export { AdvancedSettingsSetup, AdvancedSettingsStart } from './types'; +export type { AdvancedSettingsSetup, AdvancedSettingsStart } from './types'; export { ComponentRegistry } from './component_registry'; /** diff --git a/src/plugins/bfetch/public/batching/index.ts b/src/plugins/bfetch/public/batching/index.ts index 115fd84cbe97..e3a8d0169af2 100644 --- a/src/plugins/bfetch/public/batching/index.ts +++ b/src/plugins/bfetch/public/batching/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - createStreamingBatchedFunction, - StreamingBatchedFunctionParams, -} from './create_streaming_batched_function'; +export type { StreamingBatchedFunctionParams } from './create_streaming_batched_function'; +export { createStreamingBatchedFunction } from './create_streaming_batched_function'; diff --git a/src/plugins/bfetch/public/index.ts b/src/plugins/bfetch/public/index.ts index 59ee2d63ac57..6ab548032753 100644 --- a/src/plugins/bfetch/public/index.ts +++ b/src/plugins/bfetch/public/index.ts @@ -9,10 +9,10 @@ import { PluginInitializerContext } from '../../../core/public'; import { BfetchPublicPlugin } from './plugin'; -export { BfetchPublicSetup, BfetchPublicStart, BfetchPublicContract } from './plugin'; +export type { BfetchPublicSetup, BfetchPublicStart, BfetchPublicContract } from './plugin'; export { split } from './streaming'; -export { BatchedFunc } from './batching/types'; +export type { BatchedFunc } from './batching/types'; export function plugin(initializerContext: PluginInitializerContext) { return new BfetchPublicPlugin(initializerContext); diff --git a/src/plugins/bfetch/server/index.ts b/src/plugins/bfetch/server/index.ts index f4c41d10e42c..76f86e697507 100644 --- a/src/plugins/bfetch/server/index.ts +++ b/src/plugins/bfetch/server/index.ts @@ -9,7 +9,7 @@ import { PluginInitializerContext } from '../../../core/server'; import { BfetchServerPlugin } from './plugin'; -export { BfetchServerSetup, BfetchServerStart, BatchProcessingRouteParams } from './plugin'; +export type { BfetchServerSetup, BfetchServerStart, BatchProcessingRouteParams } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { return new BfetchServerPlugin(initializerContext); diff --git a/src/plugins/charts/common/index.ts b/src/plugins/charts/common/index.ts index 936ad2d10ac6..825fd74e2404 100644 --- a/src/plugins/charts/common/index.ts +++ b/src/plugins/charts/common/index.ts @@ -9,23 +9,19 @@ export const COLOR_MAPPING_SETTING = 'visualization:colorMapping'; export const LEGACY_TIME_AXIS = 'visualization:useLegacyTimeAxis'; -export { +export type { CustomPaletteArguments, CustomPaletteState, SystemPaletteArguments, PaletteOutput, - defaultCustomColors, - palette, - systemPalette, } from './palette'; +export { defaultCustomColors, palette, systemPalette } from './palette'; export { paletteIds } from './constants'; +export type { ColorSchema, RawColorSchema, ColorMap } from './static'; export { ColorSchemas, - ColorSchema, - RawColorSchema, - ColorMap, vislibColorMaps, colorSchemas, getHeatmapColors, @@ -37,4 +33,4 @@ export { MULTILAYER_TIME_AXIS_STYLE, } from './static'; -export { ColorSchemaParams, Labels, Style } from './types'; +export type { ColorSchemaParams, Labels, Style } from './types'; diff --git a/src/plugins/charts/common/static/color_maps/index.ts b/src/plugins/charts/common/static/color_maps/index.ts index c624c5ceb668..115758988f04 100644 --- a/src/plugins/charts/common/static/color_maps/index.ts +++ b/src/plugins/charts/common/static/color_maps/index.ts @@ -6,13 +6,7 @@ * Side Public License, v 1. */ -export { - ColorSchemas, - ColorSchema, - RawColorSchema, - ColorMap, - vislibColorMaps, - colorSchemas, -} from './color_maps'; +export type { ColorSchema, RawColorSchema, ColorMap } from './color_maps'; +export { ColorSchemas, vislibColorMaps, colorSchemas } from './color_maps'; export { getHeatmapColors } from './heatmap_color'; export { truncatedColorMaps, truncatedColorSchemas } from './truncated_color_maps'; diff --git a/src/plugins/charts/common/static/index.ts b/src/plugins/charts/common/static/index.ts index ac706ac7869c..4a6b3ec2b52b 100644 --- a/src/plugins/charts/common/static/index.ts +++ b/src/plugins/charts/common/static/index.ts @@ -6,11 +6,9 @@ * Side Public License, v 1. */ +export type { ColorSchema, RawColorSchema, ColorMap } from './color_maps'; export { ColorSchemas, - ColorSchema, - RawColorSchema, - ColorMap, vislibColorMaps, colorSchemas, getHeatmapColors, diff --git a/src/plugins/charts/public/index.ts b/src/plugins/charts/public/index.ts index e3d38b797c57..51d2722e3a24 100644 --- a/src/plugins/charts/public/index.ts +++ b/src/plugins/charts/public/index.ts @@ -13,23 +13,28 @@ import { ChartsPlugin } from './plugin'; export const plugin = () => new ChartsPlugin(); -export { ChartsPluginSetup, ChartsPluginStart } from './plugin'; +export type { ChartsPluginSetup, ChartsPluginStart } from './plugin'; export * from './static'; export * from './services/palettes/types'; export { lightenColor } from './services/palettes/lighten_color'; export { useActiveCursor } from './services/active_cursor'; -export { +export type { PaletteOutput, CustomPaletteArguments, CustomPaletteState, SystemPaletteArguments, - paletteIds, - ColorSchemas, ColorSchema, RawColorSchema, ColorMap, + ColorSchemaParams, + Labels, + Style, +} from '../common'; +export { + paletteIds, + ColorSchemas, vislibColorMaps, colorSchemas, getHeatmapColors, @@ -38,7 +43,4 @@ export { ColorMode, LabelRotation, defaultCountLabel, - ColorSchemaParams, - Labels, - Style, } from '../common'; diff --git a/src/plugins/charts/public/services/theme/theme.ts b/src/plugins/charts/public/services/theme/theme.ts index dfea367327e7..1aad4f0ab632 100644 --- a/src/plugins/charts/public/services/theme/theme.ts +++ b/src/plugins/charts/public/services/theme/theme.ts @@ -39,10 +39,8 @@ export class ThemeService { /** A React hook for consuming the dark mode value */ public useDarkMode = (): boolean => { - // eslint-disable-next-line react-hooks/rules-of-hooks const [value, update] = useState(false); - // eslint-disable-next-line react-hooks/rules-of-hooks useEffect(() => { const s = this.darkModeEnabled$.subscribe(update); return () => s.unsubscribe(); @@ -53,12 +51,9 @@ export class ThemeService { /** A React hook for consuming the charts theme */ public useChartsTheme = (): PartialTheme => { - // eslint-disable-next-line react-hooks/rules-of-hooks const [value, update] = useState(this._chartsTheme$.getValue()); - // eslint-disable-next-line react-hooks/rules-of-hooks const ref = useRef(value); - // eslint-disable-next-line react-hooks/rules-of-hooks useEffect(() => { const s = this.chartsTheme$.subscribe((val) => { if (val !== ref.current) { @@ -74,12 +69,9 @@ export class ThemeService { /** A React hook for consuming the charts theme */ public useChartsBaseTheme = (): Theme => { - // eslint-disable-next-line react-hooks/rules-of-hooks const [value, update] = useState(this._chartsBaseTheme$.getValue()); - // eslint-disable-next-line react-hooks/rules-of-hooks const ref = useRef(value); - // eslint-disable-next-line react-hooks/rules-of-hooks useEffect(() => { const s = this.chartsBaseTheme$.subscribe((val) => { if (val !== ref.current) { diff --git a/src/plugins/charts/server/index.ts b/src/plugins/charts/server/index.ts index e65318747224..73524964efb9 100644 --- a/src/plugins/charts/server/index.ts +++ b/src/plugins/charts/server/index.ts @@ -7,12 +7,12 @@ */ import { ChartsServerPlugin } from './plugin'; -export { +export type { PaletteOutput, CustomPaletteArguments, CustomPaletteState, SystemPaletteArguments, - paletteIds, } from '../common'; +export { paletteIds } from '../common'; export const plugin = () => new ChartsServerPlugin(); diff --git a/src/plugins/console/public/application/components/index.ts b/src/plugins/console/public/application/components/index.ts index 7bf3bc8a9c33..8f8292477cb9 100644 --- a/src/plugins/console/public/application/components/index.ts +++ b/src/plugins/console/public/application/components/index.ts @@ -8,9 +8,11 @@ export { NetworkRequestStatusBar } from './network_request_status_bar'; export { SomethingWentWrongCallout } from './something_went_wrong_callout'; -export { TopNavMenuItem, TopNavMenu } from './top_nav_menu'; +export type { TopNavMenuItem } from './top_nav_menu'; +export { TopNavMenu } from './top_nav_menu'; export { ConsoleMenu } from './console_menu'; export { WelcomePanel } from './welcome_panel'; -export { AutocompleteOptions, DevToolsSettingsModal } from './settings_modal'; +export type { AutocompleteOptions } from './settings_modal'; +export { DevToolsSettingsModal } from './settings_modal'; export { HelpPanel } from './help_panel'; export { EditorContentSpinner } from './editor_content_spinner'; diff --git a/src/plugins/console/public/application/contexts/index.ts b/src/plugins/console/public/application/contexts/index.ts index 693056ec23af..2239c4f3354c 100644 --- a/src/plugins/console/public/application/contexts/index.ts +++ b/src/plugins/console/public/application/contexts/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { useServicesContext, ServicesContextProvider, ContextValue } from './services_context'; +export type { ContextValue } from './services_context'; +export { useServicesContext, ServicesContextProvider } from './services_context'; export { useRequestActionContext, diff --git a/src/plugins/console/public/application/lib/index.ts b/src/plugins/console/public/application/lib/index.ts index 3c67718d170e..8eba01591036 100644 --- a/src/plugins/console/public/application/lib/index.ts +++ b/src/plugins/console/public/application/lib/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { createApi, Api } from './api'; +export type { Api } from './api'; +export { createApi } from './api'; export { createEsHostService, EsHostService } from './es_host_service'; diff --git a/src/plugins/console/public/services/index.ts b/src/plugins/console/public/services/index.ts index 2b1e64525d0f..c37c9d9359a1 100644 --- a/src/plugins/console/public/services/index.ts +++ b/src/plugins/console/public/services/index.ts @@ -8,4 +8,5 @@ export { createHistory, History } from './history'; export { createStorage, Storage, StorageKeys } from './storage'; -export { createSettings, Settings, DevToolsSettings, DEFAULT_SETTINGS } from './settings'; +export type { DevToolsSettings } from './settings'; +export { createSettings, Settings, DEFAULT_SETTINGS } from './settings'; diff --git a/src/plugins/console/public/types/index.ts b/src/plugins/console/public/types/index.ts index d8b6aaf7b12c..2a86e53e55b8 100644 --- a/src/plugins/console/public/types/index.ts +++ b/src/plugins/console/public/types/index.ts @@ -11,5 +11,5 @@ export * from './core_editor'; export * from './token'; export * from './tokens_provider'; export * from './common'; -export { ClientConfigType } from './config'; -export { ConsoleUILocatorParams } from './locator'; +export type { ClientConfigType } from './config'; +export type { ConsoleUILocatorParams } from './locator'; diff --git a/src/plugins/console/server/index.ts b/src/plugins/console/server/index.ts index b270b89a3d45..598dfa23958c 100644 --- a/src/plugins/console/server/index.ts +++ b/src/plugins/console/server/index.ts @@ -10,7 +10,7 @@ import { PluginInitializerContext } from 'kibana/server'; import { ConsoleServerPlugin } from './plugin'; -export { ConsoleSetup, ConsoleStart } from './types'; +export type { ConsoleSetup, ConsoleStart } from './types'; export { config } from './config'; diff --git a/src/plugins/custom_integrations/public/components/replacement_card/index.ts b/src/plugins/custom_integrations/public/components/replacement_card/index.ts index 631dc1fcb2ba..3c378d7603f9 100644 --- a/src/plugins/custom_integrations/public/components/replacement_card/index.ts +++ b/src/plugins/custom_integrations/public/components/replacement_card/index.ts @@ -8,7 +8,8 @@ import { ReplacementCard } from './replacement_card'; -export { ReplacementCard, Props } from './replacement_card'; +export type { Props } from './replacement_card'; +export { ReplacementCard } from './replacement_card'; // required for dynamic import using React.lazy() // eslint-disable-next-line import/no-default-export diff --git a/src/plugins/custom_integrations/public/index.ts b/src/plugins/custom_integrations/public/index.ts index 91da75c634a4..27176c4c5acb 100755 --- a/src/plugins/custom_integrations/public/index.ts +++ b/src/plugins/custom_integrations/public/index.ts @@ -14,7 +14,7 @@ export function plugin() { return new CustomIntegrationsPlugin(); } -export { CustomIntegrationsSetup, CustomIntegrationsStart } from './types'; +export type { CustomIntegrationsSetup, CustomIntegrationsStart } from './types'; export { withSuspense, LazyReplacementCard } from './components'; export { filterCustomIntegrations } from './services/find'; diff --git a/src/plugins/custom_integrations/server/index.ts b/src/plugins/custom_integrations/server/index.ts index 00372df50143..e2da055e745c 100755 --- a/src/plugins/custom_integrations/server/index.ts +++ b/src/plugins/custom_integrations/server/index.ts @@ -17,7 +17,7 @@ export function plugin(initializerContext: PluginInitializerContext) { return new CustomIntegrationsPlugin(initializerContext); } -export { CustomIntegrationsPluginSetup, CustomIntegrationsPluginStart } from './types'; +export type { CustomIntegrationsPluginSetup, CustomIntegrationsPluginStart } from './types'; export type { IntegrationCategory, CustomIntegration } from '../common'; diff --git a/src/plugins/dashboard/common/index.ts b/src/plugins/dashboard/common/index.ts index 1ed5bfba3abb..73e01693977d 100644 --- a/src/plugins/dashboard/common/index.ts +++ b/src/plugins/dashboard/common/index.ts @@ -6,14 +6,14 @@ * Side Public License, v 1. */ -export { GridData } from './embeddable/types'; -export { +export type { GridData } from './embeddable/types'; +export type { RawSavedDashboardPanel730ToLatest, DashboardDoc730ToLatest, DashboardDoc700To720, DashboardDocPre700, } from './bwc/types'; -export { +export type { DashboardContainerStateWithType, SavedDashboardPanelTo60, SavedDashboardPanel610, diff --git a/src/plugins/dashboard/public/application/actions/index.ts b/src/plugins/dashboard/public/application/actions/index.ts index 827ae5bcb441..2c6263314cb2 100644 --- a/src/plugins/dashboard/public/application/actions/index.ts +++ b/src/plugins/dashboard/public/application/actions/index.ts @@ -6,39 +6,22 @@ * Side Public License, v 1. */ +export type { ExpandPanelActionContext } from './expand_panel_action'; +export { ExpandPanelAction, ACTION_EXPAND_PANEL } from './expand_panel_action'; +export type { ReplacePanelActionContext } from './replace_panel_action'; +export { ReplacePanelAction, ACTION_REPLACE_PANEL } from './replace_panel_action'; +export type { ClonePanelActionContext } from './clone_panel_action'; +export { ClonePanelAction, ACTION_CLONE_PANEL } from './clone_panel_action'; +export type { AddToLibraryActionContext } from './add_to_library_action'; +export { AddToLibraryAction, ACTION_ADD_TO_LIBRARY } from './add_to_library_action'; +export type { UnlinkFromLibraryActionContext } from './unlink_from_library_action'; +export { UnlinkFromLibraryAction, ACTION_UNLINK_FROM_LIBRARY } from './unlink_from_library_action'; +export type { CopyToDashboardActionContext } from './copy_to_dashboard_action'; +export { CopyToDashboardAction, ACTION_COPY_TO_DASHBOARD } from './copy_to_dashboard_action'; +export type { LibraryNotificationActionContext } from './library_notification_action'; export { - ExpandPanelAction, - ExpandPanelActionContext, - ACTION_EXPAND_PANEL, -} from './expand_panel_action'; -export { - ReplacePanelAction, - ReplacePanelActionContext, - ACTION_REPLACE_PANEL, -} from './replace_panel_action'; -export { - ClonePanelAction, - ClonePanelActionContext, - ACTION_CLONE_PANEL, -} from './clone_panel_action'; -export { - AddToLibraryAction, - AddToLibraryActionContext, - ACTION_ADD_TO_LIBRARY, -} from './add_to_library_action'; -export { - UnlinkFromLibraryAction, - UnlinkFromLibraryActionContext, - ACTION_UNLINK_FROM_LIBRARY, -} from './unlink_from_library_action'; -export { - CopyToDashboardAction, - CopyToDashboardActionContext, - ACTION_COPY_TO_DASHBOARD, -} from './copy_to_dashboard_action'; -export { - LibraryNotificationActionContext, LibraryNotificationAction, ACTION_LIBRARY_NOTIFICATION, } from './library_notification_action'; -export { ExportContext, ExportCSVAction, ACTION_EXPORT_CSV } from './export_csv_action'; +export type { ExportContext } from './export_csv_action'; +export { ExportCSVAction, ACTION_EXPORT_CSV } from './export_csv_action'; diff --git a/src/plugins/dashboard/public/application/embeddable/index.ts b/src/plugins/dashboard/public/application/embeddable/index.ts index b3ee0f83ee85..ce8bb5b7169a 100644 --- a/src/plugins/dashboard/public/application/embeddable/index.ts +++ b/src/plugins/dashboard/public/application/embeddable/index.ts @@ -6,10 +6,8 @@ * Side Public License, v 1. */ -export { - DashboardContainerFactoryDefinition, - DashboardContainerFactory, -} from './dashboard_container_factory'; +export type { DashboardContainerFactory } from './dashboard_container_factory'; +export { DashboardContainerFactoryDefinition } from './dashboard_container_factory'; export type { DashboardContainer } from './dashboard_container'; export { createPanelState } from './panel'; diff --git a/src/plugins/dashboard/public/index.ts b/src/plugins/dashboard/public/index.ts index ff7708689c22..f25a92275d72 100644 --- a/src/plugins/dashboard/public/index.ts +++ b/src/plugins/dashboard/public/index.ts @@ -16,22 +16,19 @@ export { } from './application'; export { DashboardConstants, createDashboardEditUrl } from './dashboard_constants'; -export { +export type { DashboardSetup, DashboardStart, DashboardUrlGenerator, DashboardFeatureFlagConfig, } from './plugin'; -export { - DASHBOARD_APP_URL_GENERATOR, - createDashboardUrlGenerator, - DashboardUrlGeneratorState, -} from './url_generator'; -export { DashboardAppLocator, DashboardAppLocatorParams } from './locator'; +export type { DashboardUrlGeneratorState } from './url_generator'; +export { DASHBOARD_APP_URL_GENERATOR, createDashboardUrlGenerator } from './url_generator'; +export type { DashboardAppLocator, DashboardAppLocatorParams } from './locator'; -export { DashboardSavedObject } from './saved_dashboards'; -export { SavedDashboardPanel, DashboardContainerInput } from './types'; +export type { DashboardSavedObject } from './saved_dashboards'; +export type { SavedDashboardPanel, DashboardContainerInput } from './types'; export function plugin(initializerContext: PluginInitializerContext) { return new DashboardPlugin(initializerContext); diff --git a/src/plugins/dashboard/public/services/core.ts b/src/plugins/dashboard/public/services/core.ts index e805c6cd706a..38c91842de4f 100644 --- a/src/plugins/dashboard/public/services/core.ts +++ b/src/plugins/dashboard/public/services/core.ts @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -export { +export type { AppMountParameters, CoreSetup, Capabilities, PluginInitializerContext, - ScopedHistory, NotificationsStart, ApplicationStart, } from '../../../../core/public'; +export { ScopedHistory } from '../../../../core/public'; diff --git a/src/plugins/dashboard/public/services/home.ts b/src/plugins/dashboard/public/services/home.ts index 692a1218b953..ebbb715e53ca 100644 --- a/src/plugins/dashboard/public/services/home.ts +++ b/src/plugins/dashboard/public/services/home.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { FeatureCatalogueCategory, HomePublicPluginSetup } from '../../../home/public'; +export type { HomePublicPluginSetup } from '../../../home/public'; +export { FeatureCatalogueCategory } from '../../../home/public'; diff --git a/src/plugins/dashboard/public/services/kibana_react.ts b/src/plugins/dashboard/public/services/kibana_react.ts index 203b6aa9cd2c..4d5a3a5b5765 100644 --- a/src/plugins/dashboard/public/services/kibana_react.ts +++ b/src/plugins/dashboard/public/services/kibana_react.ts @@ -6,6 +6,11 @@ * Side Public License, v 1. */ +export type { + KibanaReactContext, + KibanaReactContextValue, + ExitFullScreenButtonProps, +} from '../../../kibana_react/public'; export { context, useKibana, @@ -13,9 +18,6 @@ export { toMountPoint, TableListView, reactToUiComponent, - KibanaReactContext, ExitFullScreenButton, KibanaContextProvider, - KibanaReactContextValue, - ExitFullScreenButtonProps, } from '../../../kibana_react/public'; diff --git a/src/plugins/dashboard/public/services/kibana_utils.ts b/src/plugins/dashboard/public/services/kibana_utils.ts index 94128f902df0..599e9b73f504 100644 --- a/src/plugins/dashboard/public/services/kibana_utils.ts +++ b/src/plugins/dashboard/public/services/kibana_utils.ts @@ -6,19 +6,21 @@ * Side Public License, v 1. */ +export type { + ISyncStateRef, + IKbnUrlStateStorage, + ReduxLikeStateContainer, +} from '../../../kibana_utils/public'; export { Storage, unhashUrl, syncState, - ISyncStateRef, getQueryParams, setStateToKbnUrl, removeQueryParam, withNotifyOnErrors, - IKbnUrlStateStorage, createKbnUrlTracker, SavedObjectNotFound, createStateContainer, - ReduxLikeStateContainer, createKbnUrlStateStorage, } from '../../../kibana_utils/public'; diff --git a/src/plugins/dashboard/public/services/navigation.ts b/src/plugins/dashboard/public/services/navigation.ts index 60373b0eb44e..eb1622eba35e 100644 --- a/src/plugins/dashboard/public/services/navigation.ts +++ b/src/plugins/dashboard/public/services/navigation.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { NavigationPublicPluginStart } from '../../../navigation/public'; +export type { NavigationPublicPluginStart } from '../../../navigation/public'; diff --git a/src/plugins/dashboard/public/services/presentation_util.ts b/src/plugins/dashboard/public/services/presentation_util.ts index 17bc97db9ac6..d640b6326729 100644 --- a/src/plugins/dashboard/public/services/presentation_util.ts +++ b/src/plugins/dashboard/public/services/presentation_util.ts @@ -6,9 +6,5 @@ * Side Public License, v 1. */ -export { - PresentationUtilPluginStart, - LazyDashboardPicker, - withSuspense, - useLabs, -} from '../../../presentation_util/public'; +export type { PresentationUtilPluginStart } from '../../../presentation_util/public'; +export { LazyDashboardPicker, withSuspense, useLabs } from '../../../presentation_util/public'; diff --git a/src/plugins/dashboard/public/services/saved_objects.ts b/src/plugins/dashboard/public/services/saved_objects.ts index bd4a73f8ed81..305ff3c2014f 100644 --- a/src/plugins/dashboard/public/services/saved_objects.ts +++ b/src/plugins/dashboard/public/services/saved_objects.ts @@ -6,14 +6,16 @@ * Side Public License, v 1. */ -export { +export type { SaveResult, SavedObject, - showSaveModal, - SavedObjectLoader, SavedObjectsStart, SavedObjectSaveOpts, - SavedObjectSaveModal, - getSavedObjectFinder, SavedObjectLoaderFindOptions, } from '../../../saved_objects/public'; +export { + showSaveModal, + SavedObjectLoader, + SavedObjectSaveModal, + getSavedObjectFinder, +} from '../../../saved_objects/public'; diff --git a/src/plugins/dashboard/public/services/share.ts b/src/plugins/dashboard/public/services/share.ts index 38a516ff80ec..7ed9b8657159 100644 --- a/src/plugins/dashboard/public/services/share.ts +++ b/src/plugins/dashboard/public/services/share.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -export { +export type { SharePluginStart, SharePluginSetup, - downloadMultipleAs, UrlGeneratorContract, } from '../../../share/public'; +export { downloadMultipleAs } from '../../../share/public'; diff --git a/src/plugins/dashboard/public/services/spaces.ts b/src/plugins/dashboard/public/services/spaces.ts index 89a0acaf611b..4ebe6644e239 100644 --- a/src/plugins/dashboard/public/services/spaces.ts +++ b/src/plugins/dashboard/public/services/spaces.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { SpacesPluginStart } from '../../../../../x-pack/plugins/spaces/public'; +export type { SpacesPluginStart } from '../../../../../x-pack/plugins/spaces/public'; diff --git a/src/plugins/dashboard/public/services/ui_actions.ts b/src/plugins/dashboard/public/services/ui_actions.ts index 017f5b232d11..5dc2e016a121 100644 --- a/src/plugins/dashboard/public/services/ui_actions.ts +++ b/src/plugins/dashboard/public/services/ui_actions.ts @@ -6,9 +6,5 @@ * Side Public License, v 1. */ -export { - Action, - IncompatibleActionError, - UiActionsSetup, - UiActionsStart, -} from '../../../ui_actions/public'; +export type { Action, UiActionsSetup, UiActionsStart } from '../../../ui_actions/public'; +export { IncompatibleActionError } from '../../../ui_actions/public'; diff --git a/src/plugins/dashboard/public/services/usage_collection.ts b/src/plugins/dashboard/public/services/usage_collection.ts index 4bf43106f4e8..dee7499c6113 100644 --- a/src/plugins/dashboard/public/services/usage_collection.ts +++ b/src/plugins/dashboard/public/services/usage_collection.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { UsageCollectionSetup } from '../../../usage_collection/public'; +export type { UsageCollectionSetup } from '../../../usage_collection/public'; diff --git a/src/plugins/dashboard/public/types.ts b/src/plugins/dashboard/public/types.ts index c4cc00838a34..d4a6cb20bc55 100644 --- a/src/plugins/dashboard/public/types.ts +++ b/src/plugins/dashboard/public/types.ts @@ -39,7 +39,7 @@ import { DashboardAppLocatorParams } from './locator'; import { SpacesPluginStart } from './services/spaces'; import type { DashboardControlGroupInput } from './application/lib/dashboard_control_group'; -export { SavedDashboardPanel }; +export type { SavedDashboardPanel }; export type NavAction = (anchorElement?: any) => void; export interface SavedDashboardPanelMap { diff --git a/src/plugins/dashboard/server/index.ts b/src/plugins/dashboard/server/index.ts index 3af8833d5e4a..c99ca43ad835 100644 --- a/src/plugins/dashboard/server/index.ts +++ b/src/plugins/dashboard/server/index.ts @@ -24,5 +24,5 @@ export function plugin(initializerContext: PluginInitializerContext) { return new DashboardPlugin(initializerContext); } -export { DashboardPluginSetup, DashboardPluginStart } from './types'; +export type { DashboardPluginSetup, DashboardPluginStart } from './types'; export { findByValueEmbeddables } from './usage/find_by_value_embeddables'; diff --git a/src/plugins/data/common/es_query/index.ts b/src/plugins/data/common/es_query/index.ts index 7029e9d064b2..28361114be6e 100644 --- a/src/plugins/data/common/es_query/index.ts +++ b/src/plugins/data/common/es_query/index.ts @@ -373,6 +373,21 @@ type EsQueryConfig = oldEsQueryConfig; * @removeBy 8.1 */ +export type { + Filter, + RangeFilterMeta, + RangeFilterParams, + ExistsFilter, + PhrasesFilter, + PhraseFilter, + MatchAllFilter, + CustomFilter, + RangeFilter, + KueryNode, + FilterMeta, + IFieldSubType, + EsQueryConfig, +}; export { COMPARE_ALL_OPTIONS, compareFilters, @@ -414,17 +429,4 @@ export { onlyDisabledFiltersChanged, uniqFilters, FilterStateStore, - Filter, - RangeFilterMeta, - RangeFilterParams, - ExistsFilter, - PhrasesFilter, - PhraseFilter, - MatchAllFilter, - CustomFilter, - RangeFilter, - KueryNode, - FilterMeta, - IFieldSubType, - EsQueryConfig, }; diff --git a/src/plugins/data/common/index.ts b/src/plugins/data/common/index.ts index 34a75f8f24dc..9a58b73d2c49 100644 --- a/src/plugins/data/common/index.ts +++ b/src/plugins/data/common/index.ts @@ -51,6 +51,12 @@ export type { IndexPatternLoadStartDependencies, IndexPatternLoadExpressionFunctionDefinition, } from '../../data_views/common'; +export type { + IndexPatternsContract, + DataViewsContract, + IndexPatternListItem, + DataViewListItem, +} from '../../data_views/common'; export { RUNTIME_FIELD_TYPES, FLEET_ASSETS_TO_IGNORE, @@ -64,13 +70,9 @@ export { DataViewType, IndexPatternType, IndexPatternsService, - IndexPatternsContract, DataViewsService, - DataViewsContract, IndexPattern, - IndexPatternListItem, DataView, - DataViewListItem, DuplicateDataViewError, DataViewSavedObjectConflictError, getIndexPatternLoadMeta, diff --git a/src/plugins/data/common/kbn_field_types/types.ts b/src/plugins/data/common/kbn_field_types/types.ts index cea35a53e9da..29471e95a36b 100644 --- a/src/plugins/data/common/kbn_field_types/types.ts +++ b/src/plugins/data/common/kbn_field_types/types.ts @@ -8,4 +8,5 @@ import { KbnFieldTypeOptions, ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; -export { KbnFieldTypeOptions, ES_FIELD_TYPES, KBN_FIELD_TYPES }; +export type { KbnFieldTypeOptions }; +export { ES_FIELD_TYPES, KBN_FIELD_TYPES }; diff --git a/src/plugins/data/common/search/aggs/types.ts b/src/plugins/data/common/search/aggs/types.ts index fec02a5ae23f..34c4f0fbf98c 100644 --- a/src/plugins/data/common/search/aggs/types.ts +++ b/src/plugins/data/common/search/aggs/types.ts @@ -89,14 +89,14 @@ import { aggSinglePercentile, } from './'; -export { IAggConfig, AggConfigSerialized } from './agg_config'; -export { CreateAggConfigParams, IAggConfigs } from './agg_configs'; -export { IAggType } from './agg_type'; -export { AggParam, AggParamOption } from './agg_params'; -export { IFieldParamType } from './param_types'; -export { IMetricAggType } from './metrics/metric_agg_type'; -export { IpRangeKey } from './buckets/lib/ip_range'; -export { OptionedValueProp } from './param_types/optioned'; +export type { IAggConfig, AggConfigSerialized } from './agg_config'; +export type { CreateAggConfigParams, IAggConfigs } from './agg_configs'; +export type { IAggType } from './agg_type'; +export type { AggParam, AggParamOption } from './agg_params'; +export type { IFieldParamType } from './param_types'; +export type { IMetricAggType } from './metrics/metric_agg_type'; +export type { IpRangeKey } from './buckets/lib/ip_range'; +export type { OptionedValueProp } from './param_types/optioned'; /** @internal */ export interface AggsCommonSetup { diff --git a/src/plugins/data/public/actions/index.ts b/src/plugins/data/public/actions/index.ts index cb4eff5c274b..0ec33f7e4652 100644 --- a/src/plugins/data/public/actions/index.ts +++ b/src/plugins/data/public/actions/index.ts @@ -6,11 +6,8 @@ * Side Public License, v 1. */ -export { - ACTION_GLOBAL_APPLY_FILTER, - createFilterAction, - ApplyGlobalFilterActionContext, -} from './apply_filter_action'; +export type { ApplyGlobalFilterActionContext } from './apply_filter_action'; +export { ACTION_GLOBAL_APPLY_FILTER, createFilterAction } from './apply_filter_action'; export { createFiltersFromValueClickAction } from './filters/create_filters_from_value_click'; export { createFiltersFromRangeSelectAction } from './filters/create_filters_from_range_select'; export * from './select_range_action'; diff --git a/src/plugins/data/public/autocomplete/collectors/index.ts b/src/plugins/data/public/autocomplete/collectors/index.ts index 5cfaab19787d..e9b5736008ab 100644 --- a/src/plugins/data/public/autocomplete/collectors/index.ts +++ b/src/plugins/data/public/autocomplete/collectors/index.ts @@ -7,4 +7,5 @@ */ export { createUsageCollector } from './create_usage_collector'; -export { AUTOCOMPLETE_EVENT_TYPE, AutocompleteUsageCollector } from './types'; +export type { AutocompleteUsageCollector } from './types'; +export { AUTOCOMPLETE_EVENT_TYPE } from './types'; diff --git a/src/plugins/data/public/autocomplete/index.ts b/src/plugins/data/public/autocomplete/index.ts index 00aa14b86409..b36af8f12eb5 100644 --- a/src/plugins/data/public/autocomplete/index.ts +++ b/src/plugins/data/public/autocomplete/index.ts @@ -6,13 +6,14 @@ * Side Public License, v 1. */ -export { +export type { QuerySuggestion, - QuerySuggestionTypes, QuerySuggestionGetFn, QuerySuggestionGetFnArgs, QuerySuggestionBasic, QuerySuggestionField, } from './providers/query_suggestion_provider'; +export { QuerySuggestionTypes } from './providers/query_suggestion_provider'; -export { AutocompleteService, AutocompleteSetup, AutocompleteStart } from './autocomplete_service'; +export type { AutocompleteSetup, AutocompleteStart } from './autocomplete_service'; +export { AutocompleteService } from './autocomplete_service'; diff --git a/src/plugins/data/public/deprecated.ts b/src/plugins/data/public/deprecated.ts index 163d32985829..8b90f92b932e 100644 --- a/src/plugins/data/public/deprecated.ts +++ b/src/plugins/data/public/deprecated.ts @@ -137,7 +137,7 @@ export const esFilters = { /** * Deprecated type exports */ -export { +export type { KueryNode, RangeFilter, RangeFilterMeta, @@ -149,9 +149,8 @@ export { MatchAllFilter, IFieldSubType, EsQueryConfig, - isFilter, - isFilters, }; +export { isFilter, isFilters }; /** * @deprecated Import helpers from the "@kbn/es-query" package directly instead. diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts index 4d51a7ae0ad7..0b749d90f715 100644 --- a/src/plugins/data/public/index.ts +++ b/src/plugins/data/public/index.ts @@ -70,29 +70,26 @@ export const indexPatterns = { validate: validateDataView, }; -export { - IndexPatternsContract, - DataViewsContract, - IndexPattern, - IndexPatternField, - TypeMeta, -} from './data_views'; +export type { IndexPatternsContract, DataViewsContract, TypeMeta } from './data_views'; +export { IndexPattern, IndexPatternField } from './data_views'; -export { +export type { IIndexPattern, IFieldType, - ES_FIELD_TYPES, - KBN_FIELD_TYPES, IndexPatternAttributes, - UI_SETTINGS, AggregationRestrictions as IndexPatternAggRestrictions, IndexPatternSpec, IndexPatternLoadExpressionFunctionDefinition, - fieldList, GetFieldsOptions, AggregationRestrictions, - IndexPatternType, IndexPatternListItem, +} from '../common'; +export { + ES_FIELD_TYPES, + KBN_FIELD_TYPES, + UI_SETTINGS, + fieldList, + IndexPatternType, DuplicateDataViewError, } from '../common'; @@ -217,7 +214,8 @@ export type { SearchUsageCollector, } from './search'; -export { ISearchOptions, isErrorResponse, isCompleteResponse, isPartialResponse } from '../common'; +export type { ISearchOptions } from '../common'; +export { isErrorResponse, isCompleteResponse, isPartialResponse } from '../common'; // Search namespace export const search = { @@ -301,7 +299,8 @@ export { export { isTimeRange, isQuery } from '../common'; -export { ACTION_GLOBAL_APPLY_FILTER, ApplyGlobalFilterActionContext } from './actions'; +export type { ApplyGlobalFilterActionContext } from './actions'; +export { ACTION_GLOBAL_APPLY_FILTER } from './actions'; export { APPLY_FILTER_TRIGGER } from './triggers'; /* diff --git a/src/plugins/data/public/now_provider/index.ts b/src/plugins/data/public/now_provider/index.ts index 4d22d674b60b..b3bfd31fca2c 100644 --- a/src/plugins/data/public/now_provider/index.ts +++ b/src/plugins/data/public/now_provider/index.ts @@ -6,8 +6,5 @@ * Side Public License, v 1. */ -export { - NowProvider, - NowProviderInternalContract, - NowProviderPublicContract, -} from './now_provider'; +export type { NowProviderInternalContract, NowProviderPublicContract } from './now_provider'; +export { NowProvider } from './now_provider'; diff --git a/src/plugins/data/public/query/query_string/index.ts b/src/plugins/data/public/query/query_string/index.ts index feef1965f8b2..63cc777f6688 100644 --- a/src/plugins/data/public/query/query_string/index.ts +++ b/src/plugins/data/public/query/query_string/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { QueryStringContract, QueryStringManager } from './query_string_manager'; +export type { QueryStringContract } from './query_string_manager'; +export { QueryStringManager } from './query_string_manager'; diff --git a/src/plugins/data/public/query/saved_query/index.ts b/src/plugins/data/public/query/saved_query/index.ts index 6cde77c7a772..03d8f0b35b9b 100644 --- a/src/plugins/data/public/query/saved_query/index.ts +++ b/src/plugins/data/public/query/saved_query/index.ts @@ -6,5 +6,10 @@ * Side Public License, v 1. */ -export { SavedQuery, SavedQueryAttributes, SavedQueryService, SavedQueryTimeFilter } from './types'; +export type { + SavedQuery, + SavedQueryAttributes, + SavedQueryService, + SavedQueryTimeFilter, +} from './types'; export { createSavedQueryService } from './saved_query_service'; diff --git a/src/plugins/data/public/query/state_sync/index.ts b/src/plugins/data/public/query/state_sync/index.ts index dac51411dfd4..58740cfab06d 100644 --- a/src/plugins/data/public/query/state_sync/index.ts +++ b/src/plugins/data/public/query/state_sync/index.ts @@ -8,4 +8,4 @@ export { connectToQueryState } from './connect_to_query_state'; export { syncQueryStateWithUrl } from './sync_state_with_url'; -export { QueryState, QueryStateChange } from './types'; +export type { QueryState, QueryStateChange } from './types'; diff --git a/src/plugins/data/public/query/timefilter/index.ts b/src/plugins/data/public/query/timefilter/index.ts index 3dfd4e0fe514..604213054fd0 100644 --- a/src/plugins/data/public/query/timefilter/index.ts +++ b/src/plugins/data/public/query/timefilter/index.ts @@ -6,11 +6,14 @@ * Side Public License, v 1. */ -export { TimefilterService, TimefilterSetup } from './timefilter_service'; +export type { TimefilterSetup } from './timefilter_service'; +export { TimefilterService } from './timefilter_service'; export * from './types'; -export { Timefilter, TimefilterContract, AutoRefreshDoneFn } from './timefilter'; -export { TimeHistory, TimeHistoryContract } from './time_history'; +export type { TimefilterContract, AutoRefreshDoneFn } from './timefilter'; +export { Timefilter } from './timefilter'; +export type { TimeHistoryContract } from './time_history'; +export { TimeHistory } from './time_history'; export { changeTimeFilter, convertRangeFilterToTimeRangeString } from './lib/change_time_filter'; export { extractTimeFilter, extractTimeRange } from './lib/extract_time_filter'; export { validateTimeRange } from './lib/validate_timerange'; diff --git a/src/plugins/data/public/query/timefilter/timefilter.ts b/src/plugins/data/public/query/timefilter/timefilter.ts index 3b537562586a..f3520abb2f46 100644 --- a/src/plugins/data/public/query/timefilter/timefilter.ts +++ b/src/plugins/data/public/query/timefilter/timefilter.ts @@ -25,7 +25,7 @@ import { import { TimeHistoryContract } from './time_history'; import { createAutoRefreshLoop, AutoRefreshDoneFn } from './lib/auto_refresh_loop'; -export { AutoRefreshDoneFn }; +export type { AutoRefreshDoneFn }; // TODO: remove! export class Timefilter { diff --git a/src/plugins/data/public/query/timefilter/types.ts b/src/plugins/data/public/query/timefilter/types.ts index 66584358ccb3..3c35ae2d79ae 100644 --- a/src/plugins/data/public/query/timefilter/types.ts +++ b/src/plugins/data/public/query/timefilter/types.ts @@ -23,4 +23,4 @@ export type InputTimeRange = to: Moment; }; -export { TimeRangeBounds } from '../../../common'; +export type { TimeRangeBounds } from '../../../common'; diff --git a/src/plugins/data/public/search/aggs/types.ts b/src/plugins/data/public/search/aggs/types.ts index 34ec3415427d..5a8110034bbc 100644 --- a/src/plugins/data/public/search/aggs/types.ts +++ b/src/plugins/data/public/search/aggs/types.ts @@ -9,4 +9,4 @@ import { AggsCommonSetup } from '../../../common'; export type AggsSetup = AggsCommonSetup; -export { AggsStart } from '../../../common'; +export type { AggsStart } from '../../../common'; diff --git a/src/plugins/data/public/search/collectors/index.ts b/src/plugins/data/public/search/collectors/index.ts index b6640a8e61f6..9eb96be5a045 100644 --- a/src/plugins/data/public/search/collectors/index.ts +++ b/src/plugins/data/public/search/collectors/index.ts @@ -7,4 +7,5 @@ */ export { createUsageCollector } from './create_usage_collector'; -export { SEARCH_EVENT_TYPE, SearchUsageCollector } from './types'; +export type { SearchUsageCollector } from './types'; +export { SEARCH_EVENT_TYPE } from './types'; diff --git a/src/plugins/data/public/search/index.ts b/src/plugins/data/public/search/index.ts index 21d607eedb15..821f16e0cf68 100644 --- a/src/plugins/data/public/search/index.ts +++ b/src/plugins/data/public/search/index.ts @@ -8,46 +8,51 @@ export * from './expressions'; -export { +export type { ISearchSetup, ISearchStart, ISearchStartSearchSource, SearchUsageCollector, } from './types'; -export { - ES_SEARCH_STRATEGY, +export type { EsQuerySortValue, - extractReferences as extractSearchSourceReferences, - getSearchParamsFromRequest, IEsSearchRequest, IEsSearchResponse, IKibanaSearchRequest, IKibanaSearchResponse, - injectReferences as injectSearchSourceReferences, ISearchGeneric, ISearchSource, - parseSearchSourceJSON, SearchError, SearchRequest, - SearchSource, SearchSourceDependencies, SearchSourceFields, - SortDirection, } from '../../common/search'; export { - SessionService, + ES_SEARCH_STRATEGY, + extractReferences as extractSearchSourceReferences, + getSearchParamsFromRequest, + injectReferences as injectSearchSourceReferences, + parseSearchSourceJSON, + SearchSource, + SortDirection, +} from '../../common/search'; +export type { ISessionService, SearchSessionInfoProvider, + ISessionsClient, + WaitUntilNextSessionCompletesOptions, +} from './session'; +export { + SessionService, SearchSessionState, SessionsClient, - ISessionsClient, noSearchSessionStorageCapabilityMessage, SEARCH_SESSIONS_MANAGEMENT_ID, waitUntilNextSessionCompletes$, - WaitUntilNextSessionCompletesOptions, } from './session'; export { getEsPreference } from './es_search'; -export { SearchInterceptor, SearchInterceptorDeps } from './search_interceptor'; +export type { SearchInterceptorDeps } from './search_interceptor'; +export { SearchInterceptor } from './search_interceptor'; export * from './errors'; diff --git a/src/plugins/data/public/search/search_interceptor/index.ts b/src/plugins/data/public/search/search_interceptor/index.ts index 411c4beefe96..bf6930276020 100644 --- a/src/plugins/data/public/search/search_interceptor/index.ts +++ b/src/plugins/data/public/search/search_interceptor/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { SearchInterceptor, ISearchInterceptor, SearchInterceptorDeps } from './search_interceptor'; +export type { ISearchInterceptor, SearchInterceptorDeps } from './search_interceptor'; +export { SearchInterceptor } from './search_interceptor'; diff --git a/src/plugins/data/public/search/session/index.ts b/src/plugins/data/public/search/session/index.ts index ce578378a2fe..c48362538a5f 100644 --- a/src/plugins/data/public/search/session/index.ts +++ b/src/plugins/data/public/search/session/index.ts @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -export { SessionService, ISessionService, SearchSessionInfoProvider } from './session_service'; +export type { ISessionService, SearchSessionInfoProvider } from './session_service'; +export { SessionService } from './session_service'; export { SearchSessionState } from './search_session_state'; -export { SessionsClient, ISessionsClient } from './sessions_client'; +export type { ISessionsClient } from './sessions_client'; +export { SessionsClient } from './sessions_client'; export { noSearchSessionStorageCapabilityMessage } from './i18n'; export { SEARCH_SESSIONS_MANAGEMENT_ID } from './constants'; -export { - waitUntilNextSessionCompletes$, - WaitUntilNextSessionCompletesOptions, -} from './session_helpers'; +export type { WaitUntilNextSessionCompletesOptions } from './session_helpers'; +export { waitUntilNextSessionCompletes$ } from './session_helpers'; diff --git a/src/plugins/data/public/search/types.ts b/src/plugins/data/public/search/types.ts index 764933d15e06..3dacad42273a 100644 --- a/src/plugins/data/public/search/types.ts +++ b/src/plugins/data/public/search/types.ts @@ -14,7 +14,7 @@ import { IndexPatternsContract } from '../../common'; import { UsageCollectionSetup } from '../../../usage_collection/public'; import { ISessionsClient, ISessionService } from './session'; -export { ISearchStartSearchSource, SearchUsageCollector }; +export type { ISearchStartSearchSource, SearchUsageCollector }; /** * The setup contract exposed by the Search plugin exposes the search strategy extension diff --git a/src/plugins/data/public/ui/index.ts b/src/plugins/data/public/ui/index.ts index 1c8df359602b..026db1b7c09e 100644 --- a/src/plugins/data/public/ui/index.ts +++ b/src/plugins/data/public/ui/index.ts @@ -6,8 +6,10 @@ * Side Public License, v 1. */ -export { IndexPatternSelectProps } from './index_pattern_select'; +export type { IndexPatternSelectProps } from './index_pattern_select'; export { FilterLabel, FilterItem } from './filter_bar'; -export { QueryStringInput, QueryStringInputProps } from './query_string_input'; -export { SearchBar, SearchBarProps, StatefulSearchBarProps } from './search_bar'; +export type { QueryStringInputProps } from './query_string_input'; +export { QueryStringInput } from './query_string_input'; +export type { SearchBarProps, StatefulSearchBarProps } from './search_bar'; +export { SearchBar } from './search_bar'; export { SuggestionsComponent } from './typeahead'; diff --git a/src/plugins/data/public/ui/saved_query_form/index.ts b/src/plugins/data/public/ui/saved_query_form/index.ts index f440294dc6eb..1590b8fc9892 100644 --- a/src/plugins/data/public/ui/saved_query_form/index.ts +++ b/src/plugins/data/public/ui/saved_query_form/index.ts @@ -7,4 +7,5 @@ */ // @internal -export { SavedQueryMeta, SaveQueryForm } from '../saved_query_form/save_query_form'; +export type { SavedQueryMeta } from '../saved_query_form/save_query_form'; +export { SaveQueryForm } from '../saved_query_form/save_query_form'; diff --git a/src/plugins/data/public/ui/search_bar/index.tsx b/src/plugins/data/public/ui/search_bar/index.tsx index 64dacee4ad36..fac421dd743d 100644 --- a/src/plugins/data/public/ui/search_bar/index.tsx +++ b/src/plugins/data/public/ui/search_bar/index.tsx @@ -21,5 +21,5 @@ const WrappedSearchBar = (props: SearchBarProps) => ( ); export const SearchBar = injectI18n(withKibana(WrappedSearchBar)); -export { StatefulSearchBarProps } from './create_search_bar'; +export type { StatefulSearchBarProps } from './create_search_bar'; export type { SearchBarProps, SearchBarOwnProps } from './search_bar'; diff --git a/src/plugins/data/server/index.ts b/src/plugins/data/server/index.ts index fce73e65dc69..939d4a9fa323 100644 --- a/src/plugins/data/server/index.ts +++ b/src/plugins/data/server/index.ts @@ -36,20 +36,18 @@ export { DATA_VIEW_SAVED_OBJECT_TYPE } from '../common'; * Index patterns: */ +export type { FieldDescriptor, IndexPatternsServiceStart } from './data_views'; export { IndexPatternsFetcher, - shouldReadFieldFromDocValues, // used only in logstash_fields fixture - FieldDescriptor, + shouldReadFieldFromDocValues, getCapabilitiesForRollupIndices, - IndexPatternsServiceStart, } from './data_views'; +export type { IFieldType, IndexPatternAttributes } from '../common'; export { IndexPatternField, - IFieldType, ES_FIELD_TYPES, KBN_FIELD_TYPES, - IndexPatternAttributes, UI_SETTINGS, IndexPattern, IndexPatternsService, @@ -72,29 +70,24 @@ import { } from '../common'; import { autocompleteConfigDeprecationProvider } from './config_deprecations'; -export { - // aggs - METRIC_TYPES, +export type { ParsedInterval, - // search ISearchOptions, IEsSearchRequest, IEsSearchResponse, - ES_SEARCH_STRATEGY, } from '../common'; +export { METRIC_TYPES, ES_SEARCH_STRATEGY } from '../common'; -export { +export type { IScopedSearchClient, ISearchStrategy, SearchStrategyDependencies, - shimHitsTotal, - SearchSessionService, ISearchSessionService, SearchRequestHandlerContext, DataRequestHandlerContext, AsyncSearchStatusResponse, - NoSearchIdInSessionError, } from './search'; +export { shimHitsTotal, SearchSessionService, NoSearchIdInSessionError } from './search'; // Search namespace export const search = { @@ -112,14 +105,8 @@ export const search = { * @public */ -export { - castEsToKbnFieldTypeName, - getTime, - // timefilter - TimeRange, - // utils - parseInterval, -} from '../common'; +export type { TimeRange } from '../common'; +export { castEsToKbnFieldTypeName, getTime, parseInterval } from '../common'; /** * Static code to be shared externally @@ -130,11 +117,8 @@ export function plugin(initializerContext: PluginInitializerContext = { deprecations: autocompleteConfigDeprecationProvider, diff --git a/src/plugins/data/server/search/index.ts b/src/plugins/data/server/search/index.ts index b9affe96ea2d..b7087e95c0a2 100644 --- a/src/plugins/data/server/search/index.ts +++ b/src/plugins/data/server/search/index.ts @@ -10,7 +10,8 @@ export * from './types'; export * from './strategies/es_search'; export * from './strategies/ese_search'; export * from './strategies/eql_search'; -export { usageProvider, SearchUsage, searchUsageObserver } from './collectors'; +export type { SearchUsage } from './collectors'; +export { usageProvider, searchUsageObserver } from './collectors'; export * from './aggs'; export * from './session'; export * from './errors/no_search_id_in_session'; diff --git a/src/plugins/data/server/search/strategies/es_search/index.ts b/src/plugins/data/server/search/strategies/es_search/index.ts index d43fab0a86e6..53a791455e64 100644 --- a/src/plugins/data/server/search/strategies/es_search/index.ts +++ b/src/plugins/data/server/search/strategies/es_search/index.ts @@ -9,4 +9,5 @@ export { esSearchStrategyProvider } from './es_search_strategy'; export * from './request_utils'; export * from './response_utils'; -export { ES_SEARCH_STRATEGY, IEsSearchRequest, IEsSearchResponse } from '../../../../common'; +export type { IEsSearchRequest, IEsSearchResponse } from '../../../../common'; +export { ES_SEARCH_STRATEGY } from '../../../../common'; diff --git a/src/plugins/data_views/common/index.ts b/src/plugins/data_views/common/index.ts index b057a1ba8417..b3123df2597c 100644 --- a/src/plugins/data_views/common/index.ts +++ b/src/plugins/data_views/common/index.ts @@ -55,13 +55,10 @@ export type { SourceFilter, } from './types'; export { DataViewType, IndexPatternType } from './types'; -export { - IndexPatternsService, - IndexPatternsContract, - DataViewsService, - DataViewsContract, -} from './data_views'; -export { IndexPattern, IndexPatternListItem, DataView, DataViewListItem } from './data_views'; +export type { IndexPatternsContract, DataViewsContract } from './data_views'; +export { IndexPatternsService, DataViewsService } from './data_views'; +export type { IndexPatternListItem, DataViewListItem } from './data_views'; +export { IndexPattern, DataView } from './data_views'; export { DuplicateDataViewError, DataViewSavedObjectConflictError } from './errors'; export type { IndexPatternExpressionType, diff --git a/src/plugins/data_views/public/index.ts b/src/plugins/data_views/public/index.ts index 3a6b5ccb237f..650d2132212f 100644 --- a/src/plugins/data_views/public/index.ts +++ b/src/plugins/data_views/public/index.ts @@ -15,15 +15,15 @@ export { } from '../common/lib'; export { onRedirectNoIndexPattern } from './data_views'; -export { IndexPatternField, IIndexPatternFieldList, TypeMeta } from '../common'; +export type { IIndexPatternFieldList, TypeMeta } from '../common'; +export { IndexPatternField } from '../common'; +export type { IndexPatternsContract, DataViewsContract } from './data_views'; export { IndexPatternsService, - IndexPatternsContract, IndexPattern, DataViewsApiClient, DataViewsService, - DataViewsContract, DataView, } from './data_views'; export { UiSettingsPublicToCommon } from './ui_settings_wrapper'; diff --git a/src/plugins/data_views/server/index.ts b/src/plugins/data_views/server/index.ts index 1c7eeb073bbe..7a4df9518b43 100644 --- a/src/plugins/data_views/server/index.ts +++ b/src/plugins/data_views/server/index.ts @@ -7,14 +7,14 @@ */ export { getFieldByName, findIndexPatternById } from './utils'; +export type { FieldDescriptor } from './fetcher'; export { IndexPatternsFetcher, - FieldDescriptor, shouldReadFieldFromDocValues, mergeCapabilitiesWithFields, getCapabilitiesForRollupIndices, } from './fetcher'; -export { IndexPatternsServiceStart } from './types'; +export type { IndexPatternsServiceStart } from './types'; import { PluginInitializerContext } from 'src/core/server'; import { DataViewsServerPlugin } from './plugin'; @@ -30,8 +30,8 @@ export function plugin(initializerContext: PluginInitializerContext) { return new DataViewsServerPlugin(initializerContext); } -export { - DataViewsServerPlugin as Plugin, +export type { DataViewsServerPluginSetup as PluginSetup, DataViewsServerPluginStart as PluginStart, }; +export { DataViewsServerPlugin as Plugin }; diff --git a/src/plugins/discover/public/index.ts b/src/plugins/discover/public/index.ts index 21f1c31e774e..cb7b29afe3f9 100644 --- a/src/plugins/discover/public/index.ts +++ b/src/plugins/discover/public/index.ts @@ -9,22 +9,24 @@ import { PluginInitializerContext } from 'kibana/public'; import { DiscoverPlugin } from './plugin'; +export type { SavedSearch } from './saved_searches'; export { getSavedSearch, getSavedSearchFullPathUrl, getSavedSearchUrl, getSavedSearchUrlConflictMessage, throwErrorOnSavedSearchUrlConflict, - SavedSearch, } from './saved_searches'; -export { DiscoverSetup, DiscoverStart } from './plugin'; +export type { DiscoverSetup, DiscoverStart } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { return new DiscoverPlugin(initializerContext); } -export { ISearchEmbeddable, SEARCH_EMBEDDABLE_TYPE, SearchInput } from './application/embeddable'; +export type { ISearchEmbeddable, SearchInput } from './application/embeddable'; +export { SEARCH_EMBEDDABLE_TYPE } from './application/embeddable'; export { loadSharingDataHelpers } from './shared'; -export { DISCOVER_APP_URL_GENERATOR, DiscoverUrlGeneratorState } from './url_generator'; -export { DiscoverAppLocator, DiscoverAppLocatorParams } from './locator'; +export type { DiscoverUrlGeneratorState } from './url_generator'; +export { DISCOVER_APP_URL_GENERATOR } from './url_generator'; +export type { DiscoverAppLocator, DiscoverAppLocatorParams } from './locator'; diff --git a/src/plugins/discover/public/saved_searches/index.ts b/src/plugins/discover/public/saved_searches/index.ts index da9dd047fb5a..c41c92df3008 100644 --- a/src/plugins/discover/public/saved_searches/index.ts +++ b/src/plugins/discover/public/saved_searches/index.ts @@ -15,6 +15,7 @@ export { } from './saved_searches_utils'; export { useSavedSearchAliasMatchRedirect } from './saved_search_alias_match_redirect'; export { SavedSearchURLConflictCallout } from './saved_search_url_conflict_callout'; -export { saveSavedSearch, SaveSavedSearchOptions } from './save_saved_searches'; +export type { SaveSavedSearchOptions } from './save_saved_searches'; +export { saveSavedSearch } from './save_saved_searches'; export { SAVED_SEARCH_TYPE } from './constants'; export type { SavedSearch, SortOrder } from './types'; diff --git a/src/plugins/embeddable/public/index.ts b/src/plugins/embeddable/public/index.ts index 80171e1ad2fa..6a6b5b2df2dd 100644 --- a/src/plugins/embeddable/public/index.ts +++ b/src/plugins/embeddable/public/index.ts @@ -11,76 +11,78 @@ import './index.scss'; import { PluginInitializerContext } from 'src/core/public'; import { EmbeddablePublicPlugin } from './plugin'; +export type { + Adapters, + ReferenceOrValueEmbeddable, + ChartActionContext, + ContainerInput, + ContainerOutput, + EmbeddableChildPanelProps, + EmbeddableContext, + EmbeddableFactory, + EmbeddableFactoryDefinition, + EmbeddableInput, + EmbeddableInstanceConfiguration, + EmbeddableOutput, + ValueClickContext, + RangeSelectContext, + IContainer, + IEmbeddable, + OutputSpec, + PanelState, + PropertySpec, + SavedObjectEmbeddableInput, + EmbeddableEditorState, + EmbeddablePackageState, + EmbeddableRendererProps, +} from './lib'; export { ACTION_ADD_PANEL, ACTION_EDIT_PANEL, - Adapters, AddPanelAction, - ReferenceOrValueEmbeddable, isReferenceOrValueEmbeddable, - ChartActionContext, Container, - ContainerInput, - ContainerOutput, CONTEXT_MENU_TRIGGER, contextMenuTrigger, defaultEmbeddableFactoryProvider, EditPanelAction, Embeddable, EmbeddableChildPanel, - EmbeddableChildPanelProps, - EmbeddableContext, - EmbeddableFactory, - EmbeddableFactoryDefinition, EmbeddableFactoryNotFoundError, - EmbeddableInput, - EmbeddableInstanceConfiguration, - EmbeddableOutput, EmbeddablePanel, EmbeddableRoot, - ValueClickContext, - RangeSelectContext, ErrorEmbeddable, - IContainer, - IEmbeddable, isEmbeddable, isErrorEmbeddable, openAddPanelFlyout, - OutputSpec, PANEL_BADGE_TRIGGER, panelBadgeTrigger, PANEL_NOTIFICATION_TRIGGER, panelNotificationTrigger, PanelNotFoundError, - PanelState, - PropertySpec, SELECT_RANGE_TRIGGER, VALUE_CLICK_TRIGGER, ViewMode, withEmbeddableSubscription, - SavedObjectEmbeddableInput, isSavedObjectEmbeddableInput, isRangeSelectTriggerContext, isValueClickTriggerContext, isRowClickTriggerContext, isContextMenuTriggerContext, EmbeddableStateTransfer, - EmbeddableEditorState, - EmbeddablePackageState, EmbeddableRenderer, - EmbeddableRendererProps, useEmbeddableFactory, } from './lib'; export { AttributeService, ATTRIBUTE_SERVICE_KEY } from './lib/attribute_service'; -export { EnhancementRegistryDefinition } from './types'; +export type { EnhancementRegistryDefinition } from './types'; export function plugin(initializerContext: PluginInitializerContext) { return new EmbeddablePublicPlugin(initializerContext); } -export { +export type { EmbeddableSetup, EmbeddableStart, EmbeddableSetupDependencies, diff --git a/src/plugins/embeddable/public/lib/containers/i_container.ts b/src/plugins/embeddable/public/lib/containers/i_container.ts index f68a3ada33c0..c4593cac4969 100644 --- a/src/plugins/embeddable/public/lib/containers/i_container.ts +++ b/src/plugins/embeddable/public/lib/containers/i_container.ts @@ -15,7 +15,7 @@ import { } from '../embeddables'; import { PanelState } from '../../../common/types'; -export { PanelState }; +export type { PanelState }; export interface ContainerOutput extends EmbeddableOutput { embeddableLoaded: { [key: string]: boolean }; diff --git a/src/plugins/embeddable/public/lib/containers/index.ts b/src/plugins/embeddable/public/lib/containers/index.ts index cc2c0bfa5822..041923188e17 100644 --- a/src/plugins/embeddable/public/lib/containers/index.ts +++ b/src/plugins/embeddable/public/lib/containers/index.ts @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -export { IContainer, PanelState, ContainerInput, ContainerOutput } from './i_container'; +export type { IContainer, PanelState, ContainerInput, ContainerOutput } from './i_container'; export { Container } from './container'; export * from './embeddable_child_panel'; diff --git a/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts b/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts index bbac617d4159..b53f03602425 100644 --- a/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts +++ b/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts @@ -16,7 +16,7 @@ export interface EmbeddableError { message: string; } -export { EmbeddableInput }; +export type { EmbeddableInput }; export interface EmbeddableOutput { // Whether the embeddable is actively loading. diff --git a/src/plugins/embeddable/public/lib/embeddables/index.ts b/src/plugins/embeddable/public/lib/embeddables/index.ts index eede745f3179..1745c64c73bf 100644 --- a/src/plugins/embeddable/public/lib/embeddables/index.ts +++ b/src/plugins/embeddable/public/lib/embeddables/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { EmbeddableOutput, EmbeddableInput, IEmbeddable } from './i_embeddable'; +export type { EmbeddableOutput, EmbeddableInput, IEmbeddable } from './i_embeddable'; export { isEmbeddable } from './is_embeddable'; export { Embeddable } from './embeddable'; export * from './embeddable_factory'; @@ -16,8 +16,5 @@ export { ErrorEmbeddable, isErrorEmbeddable } from './error_embeddable'; export { withEmbeddableSubscription } from './with_subscription'; export { EmbeddableRoot } from './embeddable_root'; export * from '../../../common/lib/saved_object_embeddable'; -export { - EmbeddableRenderer, - EmbeddableRendererProps, - useEmbeddableFactory, -} from './embeddable_renderer'; +export type { EmbeddableRendererProps } from './embeddable_renderer'; +export { EmbeddableRenderer, useEmbeddableFactory } from './embeddable_renderer'; diff --git a/src/plugins/embeddable/public/lib/reference_or_value_embeddable/index.ts b/src/plugins/embeddable/public/lib/reference_or_value_embeddable/index.ts index a448eb1319ab..41554e8efce1 100644 --- a/src/plugins/embeddable/public/lib/reference_or_value_embeddable/index.ts +++ b/src/plugins/embeddable/public/lib/reference_or_value_embeddable/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { ReferenceOrValueEmbeddable, isReferenceOrValueEmbeddable } from './types'; +export type { ReferenceOrValueEmbeddable } from './types'; +export { isReferenceOrValueEmbeddable } from './types'; diff --git a/src/plugins/embeddable/public/lib/state_transfer/index.ts b/src/plugins/embeddable/public/lib/state_transfer/index.ts index 6643f048d642..009b2994f9ca 100644 --- a/src/plugins/embeddable/public/lib/state_transfer/index.ts +++ b/src/plugins/embeddable/public/lib/state_transfer/index.ts @@ -7,4 +7,4 @@ */ export { EmbeddableStateTransfer } from './embeddable_state_transfer'; -export { EmbeddableEditorState, EmbeddablePackageState } from './types'; +export type { EmbeddableEditorState, EmbeddablePackageState } from './types'; diff --git a/src/plugins/embeddable/public/lib/types.ts b/src/plugins/embeddable/public/lib/types.ts index 2def03c742e7..d22bcbd12bef 100644 --- a/src/plugins/embeddable/public/lib/types.ts +++ b/src/plugins/embeddable/public/lib/types.ts @@ -22,4 +22,4 @@ export interface PropertySpec { value?: string; } export { ViewMode } from '../../common/types'; -export { Adapters }; +export type { Adapters }; diff --git a/src/plugins/embeddable/server/index.ts b/src/plugins/embeddable/server/index.ts index aac081f9467b..8d88f35a4be2 100644 --- a/src/plugins/embeddable/server/index.ts +++ b/src/plugins/embeddable/server/index.ts @@ -8,8 +8,8 @@ import { EmbeddableServerPlugin, EmbeddableSetup, EmbeddableStart } from './plugin'; -export { EmbeddableSetup, EmbeddableStart }; +export type { EmbeddableSetup, EmbeddableStart }; -export { EnhancementRegistryDefinition, EmbeddableRegistryDefinition } from './types'; +export type { EnhancementRegistryDefinition, EmbeddableRegistryDefinition } from './types'; export const plugin = () => new EmbeddableServerPlugin(); diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/index.ts b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/index.ts index 75d79a204f14..a43e7c1b31e4 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/index.ts +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/components/index.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ +export type { Authorization } from './authorization_provider'; export { AuthorizationProvider, AuthorizationContext, useAuthorizationContext, - Authorization, } from './authorization_provider'; export { WithPrivileges } from './with_privileges'; diff --git a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/index.ts b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/index.ts index 9ccbc5a5cd3d..57d5cd88d3e4 100644 --- a/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/index.ts +++ b/src/plugins/es_ui_shared/__packages_do_not_import__/authorization/index.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +export type { Authorization } from './components'; export { WithPrivileges, NotAuthorizedSection, @@ -14,7 +15,6 @@ export { SectionError, PageError, useAuthorizationContext, - Authorization, } from './components'; -export { Privileges, MissingPrivileges, Error } from './types'; +export type { Privileges, MissingPrivileges, Error } from './types'; diff --git a/src/plugins/es_ui_shared/common/index.ts b/src/plugins/es_ui_shared/common/index.ts index 1c2955b8e5e2..4f0185ba110d 100644 --- a/src/plugins/es_ui_shared/common/index.ts +++ b/src/plugins/es_ui_shared/common/index.ts @@ -6,4 +6,7 @@ * Side Public License, v 1. */ -export { Privileges, MissingPrivileges } from '../__packages_do_not_import__/authorization/types'; +export type { + Privileges, + MissingPrivileges, +} from '../__packages_do_not_import__/authorization/types'; diff --git a/src/plugins/es_ui_shared/public/authorization/index.ts b/src/plugins/es_ui_shared/public/authorization/index.ts index b8fb2f45794e..8175d6b80d29 100644 --- a/src/plugins/es_ui_shared/public/authorization/index.ts +++ b/src/plugins/es_ui_shared/public/authorization/index.ts @@ -6,16 +6,18 @@ * Side Public License, v 1. */ +export type { + Error, + MissingPrivileges, + Privileges, + Authorization, +} from '../../__packages_do_not_import__/authorization'; export { AuthorizationContext, AuthorizationProvider, - Error, - MissingPrivileges, NotAuthorizedSection, - Privileges, SectionError, PageError, useAuthorizationContext, WithPrivileges, - Authorization, } from '../../__packages_do_not_import__/authorization'; diff --git a/src/plugins/es_ui_shared/public/components/cron_editor/index.ts b/src/plugins/es_ui_shared/public/components/cron_editor/index.ts index 88176c429fcf..bee0bc412fb5 100644 --- a/src/plugins/es_ui_shared/public/components/cron_editor/index.ts +++ b/src/plugins/es_ui_shared/public/components/cron_editor/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export { Frequency } from './types'; +export type { Frequency } from './types'; export { CronEditor } from './cron_editor'; diff --git a/src/plugins/es_ui_shared/public/components/cron_editor/services/index.ts b/src/plugins/es_ui_shared/public/components/cron_editor/services/index.ts index 85d650994b33..8988c640cd09 100644 --- a/src/plugins/es_ui_shared/public/components/cron_editor/services/index.ts +++ b/src/plugins/es_ui_shared/public/components/cron_editor/services/index.ts @@ -7,10 +7,5 @@ */ export { cronExpressionToParts, cronPartsToExpression } from './cron'; -export { - getOrdinalValue, - getDayName, - getMonthName, - DayOrdinal, - MonthOrdinal, -} from './humanized_numbers'; +export type { DayOrdinal, MonthOrdinal } from './humanized_numbers'; +export { getOrdinalValue, getDayName, getMonthName } from './humanized_numbers'; diff --git a/src/plugins/es_ui_shared/public/components/json_editor/index.ts b/src/plugins/es_ui_shared/public/components/json_editor/index.ts index bf7697523d3f..f31f586f1033 100644 --- a/src/plugins/es_ui_shared/public/components/json_editor/index.ts +++ b/src/plugins/es_ui_shared/public/components/json_editor/index.ts @@ -8,4 +8,4 @@ export * from './json_editor'; -export { OnJsonEditorUpdateHandler, JsonEditorState } from './use_json'; +export type { OnJsonEditorUpdateHandler, JsonEditorState } from './use_json'; diff --git a/src/plugins/es_ui_shared/public/forms/form_wizard/index.ts b/src/plugins/es_ui_shared/public/forms/form_wizard/index.ts index 6c4912f7e4b3..0f868712553c 100644 --- a/src/plugins/es_ui_shared/public/forms/form_wizard/index.ts +++ b/src/plugins/es_ui_shared/public/forms/form_wizard/index.ts @@ -10,12 +10,12 @@ export { FormWizard } from './form_wizard'; export { FormWizardStep } from './form_wizard_step'; +export type { Step, Steps } from './form_wizard_context'; export { FormWizardProvider, FormWizardConsumer, useFormWizardContext, - Step, - Steps, } from './form_wizard_context'; -export { FormWizardNav, NavTexts } from './form_wizard_nav'; +export type { NavTexts } from './form_wizard_nav'; +export { FormWizardNav } from './form_wizard_nav'; diff --git a/src/plugins/es_ui_shared/public/forms/multi_content/index.ts b/src/plugins/es_ui_shared/public/forms/multi_content/index.ts index 76ff8a9ff306..bae46ad0abfd 100644 --- a/src/plugins/es_ui_shared/public/forms/multi_content/index.ts +++ b/src/plugins/es_ui_shared/public/forms/multi_content/index.ts @@ -13,6 +13,7 @@ export { useContent, } from './multi_content_context'; -export { useMultiContent, HookProps, Content, MultiContent } from './use_multi_content'; +export type { HookProps, Content, MultiContent } from './use_multi_content'; +export { useMultiContent } from './use_multi_content'; export { WithMultiContent } from './with_multi_content'; diff --git a/src/plugins/es_ui_shared/public/index.ts b/src/plugins/es_ui_shared/public/index.ts index 2dc50536ca63..c21587c9a604 100644 --- a/src/plugins/es_ui_shared/public/index.ts +++ b/src/plugins/es_ui_shared/public/index.ts @@ -15,37 +15,36 @@ import * as ace from './ace'; import * as GlobalFlyout from './global_flyout'; import * as XJson from './xjson'; -export { JsonEditor, OnJsonEditorUpdateHandler, JsonEditorState } from './components/json_editor'; +export type { OnJsonEditorUpdateHandler, JsonEditorState } from './components/json_editor'; +export { JsonEditor } from './components/json_editor'; export { PageLoading } from './components/page_loading'; export { SectionLoading } from './components/section_loading'; -export { EuiCodeEditor, EuiCodeEditorProps } from './components/code_editor'; -export { Frequency, CronEditor } from './components/cron_editor'; +export type { EuiCodeEditorProps } from './components/code_editor'; +export { EuiCodeEditor } from './components/code_editor'; +export type { Frequency } from './components/cron_editor'; +export { CronEditor } from './components/cron_editor'; -export { +export type { SendRequestConfig, SendRequestResponse, UseRequestConfig, UseRequestResponse, - sendRequest, - useRequest, } from './request'; +export { sendRequest, useRequest } from './request'; export { indices } from './indices'; +export type { Privileges, MissingPrivileges, Error, Authorization } from './authorization'; export { AuthorizationContext, AuthorizationProvider, NotAuthorizedSection, WithPrivileges, - Privileges, - MissingPrivileges, SectionError, PageError, - Error, useAuthorizationContext, - Authorization, } from './authorization'; export { Forms, ace, GlobalFlyout, XJson }; diff --git a/src/plugins/es_ui_shared/public/request/index.ts b/src/plugins/es_ui_shared/public/request/index.ts index da407d001303..5cfcc77f8e11 100644 --- a/src/plugins/es_ui_shared/public/request/index.ts +++ b/src/plugins/es_ui_shared/public/request/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { SendRequestConfig, SendRequestResponse, sendRequest } from './send_request'; -export { UseRequestConfig, UseRequestResponse, useRequest } from './use_request'; +export type { SendRequestConfig, SendRequestResponse } from './send_request'; +export { sendRequest } from './send_request'; +export type { UseRequestConfig, UseRequestResponse } from './use_request'; +export { useRequest } from './use_request'; diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/index.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/index.ts index 8438e5de871b..6f2dc768508e 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/index.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { useField, InternalFieldConfig } from './use_field'; +export type { InternalFieldConfig } from './use_field'; +export { useField } from './use_field'; export { useForm } from './use_form'; export { useFormData } from './use_form_data'; export { useFormIsModified } from './use_form_is_modified'; diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/lib/index.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/lib/index.ts index 79d1067cd36b..0bbaedcf2e90 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/lib/index.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/lib/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { Subject, Subscription } from './subject'; +export type { Subscription } from './subject'; +export { Subject } from './subject'; export * from './utils'; diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/shared_imports.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/shared_imports.ts index c57333d788ef..cd9bb97cab8d 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/shared_imports.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/shared_imports.ts @@ -7,7 +7,9 @@ */ // eslint-disable-next-line import/no-extraneous-dependencies -export { registerTestBed, TestBed } from '@kbn/test/jest'; +export type { TestBed } from '@kbn/test/jest'; +// eslint-disable-next-line import/no-extraneous-dependencies +export { registerTestBed } from '@kbn/test/jest'; // eslint-disable-next-line import/no-extraneous-dependencies export { getRandomString } from '@kbn/test/jest'; diff --git a/src/plugins/expressions/common/expression_functions/specs/index.ts b/src/plugins/expressions/common/expression_functions/specs/index.ts index de9a1dedd824..0e473e4a79e5 100644 --- a/src/plugins/expressions/common/expression_functions/specs/index.ts +++ b/src/plugins/expressions/common/expression_functions/specs/index.ts @@ -17,6 +17,9 @@ export * from './overall_metric'; export * from './derivative'; export * from './moving_average'; export * from './ui_setting'; -export { mapColumn, MapColumnArguments } from './map_column'; -export { math, MathArguments, MathInput } from './math'; -export { mathColumn, MathColumnArguments } from './math_column'; +export type { MapColumnArguments } from './map_column'; +export { mapColumn } from './map_column'; +export type { MathArguments, MathInput } from './math'; +export { math } from './math'; +export type { MathColumnArguments } from './math_column'; +export { mathColumn } from './math_column'; diff --git a/src/plugins/expressions/common/types/index.ts b/src/plugins/expressions/common/types/index.ts index 00a79289c0b5..a7fc51d88c23 100644 --- a/src/plugins/expressions/common/types/index.ts +++ b/src/plugins/expressions/common/types/index.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { TypeToString, KnownTypeToString, TypeString, UnmappedTypeStrings } from './common'; +export type { TypeToString, KnownTypeToString, TypeString, UnmappedTypeStrings } from './common'; export * from './style'; export * from './registry'; diff --git a/src/plugins/expressions/server/index.ts b/src/plugins/expressions/server/index.ts index 7c0662ad54e4..db94ed6dbd44 100644 --- a/src/plugins/expressions/server/index.ts +++ b/src/plugins/expressions/server/index.ts @@ -12,7 +12,7 @@ import { PluginInitializerContext } from 'src/core/server'; import { ExpressionsServerPlugin } from './plugin'; -export { ExpressionsServerSetup, ExpressionsServerStart } from './plugin'; +export type { ExpressionsServerSetup, ExpressionsServerStart } from './plugin'; // Kibana Platform. export { ExpressionsServerPlugin as Plugin }; @@ -22,22 +22,18 @@ export function plugin(initializerContext: PluginInitializerContext) { } // Static exports. -export { +export type { AnyExpressionFunctionDefinition, AnyExpressionTypeDefinition, ArgumentType, - buildExpression, - buildExpressionFunction, Datatable, DatatableColumn, DatatableColumnType, DatatableRow, - Execution, ExecutionContainer, ExecutionContext, ExecutionParams, ExecutionState, - Executor, ExecutorContainer, ExecutorState, ExpressionAstArgument, @@ -46,15 +42,10 @@ export { ExpressionAstFunction, ExpressionAstFunctionBuilder, ExpressionAstNode, - ExpressionFunction, ExpressionFunctionDefinition, ExpressionFunctionDefinitions, - ExpressionFunctionParameter, ExpressionImage, ExpressionRenderDefinition, - ExpressionRenderer, - ExpressionRendererRegistry, - ExpressionType, ExpressionTypeDefinition, ExpressionTypeStyle, ExpressionValue, @@ -67,20 +58,11 @@ export { ExpressionValueFilter, Font, FontLabel, - FontStyle, FontValue, - FontWeight, - format, - formatExpression, - FunctionsRegistry, IInterpreterRenderHandlers, InterpreterErrorType, IRegistry, - isExpressionAstBuilder, KnownTypeToString, - Overflow, - parse, - parseExpression, PointSeries, PointSeriesColumn, PointSeriesColumnName, @@ -89,11 +71,31 @@ export { Range, SerializedDatatable, Style, - TextAlignment, - TextDecoration, - TypesRegistry, TypeString, TypeToString, UnmappedTypeStrings, ExpressionValueRender as Render, } from '../common'; +export { + buildExpression, + buildExpressionFunction, + Execution, + Executor, + ExpressionFunction, + ExpressionFunctionParameter, + ExpressionRenderer, + ExpressionRendererRegistry, + ExpressionType, + FontStyle, + FontWeight, + format, + formatExpression, + FunctionsRegistry, + isExpressionAstBuilder, + Overflow, + parse, + parseExpression, + TextAlignment, + TextDecoration, + TypesRegistry, +} from '../common'; diff --git a/src/plugins/field_formats/common/index.ts b/src/plugins/field_formats/common/index.ts index aeb5e0af220d..5863bf79adcb 100644 --- a/src/plugins/field_formats/common/index.ts +++ b/src/plugins/field_formats/common/index.ts @@ -12,7 +12,8 @@ import { FieldFormatsRegistry } from './field_formats_registry'; /** @public */ type IFieldFormatsRegistry = PublicMethodsOf; -export { FieldFormatsRegistry, IFieldFormatsRegistry }; +export type { IFieldFormatsRegistry }; +export { FieldFormatsRegistry }; export { FieldFormat } from './field_format'; export { baseFormatters } from './constants/base_formatters'; export { @@ -39,7 +40,7 @@ export { FORMATS_UI_SETTINGS } from './constants/ui_settings'; export { FIELD_FORMAT_IDS } from './types'; export { HTML_CONTEXT_TYPE, TEXT_CONTEXT_TYPE } from './content_types'; -export { +export type { FieldFormatsGetConfigFn, FieldFormatsContentType, FieldFormatConfig, diff --git a/src/plugins/field_formats/public/index.ts b/src/plugins/field_formats/public/index.ts index f765513fb4c4..f4f7019fe772 100755 --- a/src/plugins/field_formats/public/index.ts +++ b/src/plugins/field_formats/public/index.ts @@ -12,4 +12,4 @@ export { DateFormat, DateNanosFormat } from './lib/converters'; export function plugin() { return new FieldFormatsPlugin(); } -export { FieldFormatsSetup, FieldFormatsStart } from './plugin'; +export type { FieldFormatsSetup, FieldFormatsStart } from './plugin'; diff --git a/src/plugins/field_formats/server/index.ts b/src/plugins/field_formats/server/index.ts index 44de8fde558e..d3cac3bfb00c 100755 --- a/src/plugins/field_formats/server/index.ts +++ b/src/plugins/field_formats/server/index.ts @@ -14,4 +14,4 @@ export function plugin(initializerContext: PluginInitializerContext) { return new FieldFormatsPlugin(initializerContext); } -export { FieldFormatsSetup, FieldFormatsStart } from './types'; +export type { FieldFormatsSetup, FieldFormatsStart } from './types'; diff --git a/src/plugins/index_pattern_editor/public/components/index.ts b/src/plugins/index_pattern_editor/public/components/index.ts index c32c4081e973..b78ac6946ad9 100644 --- a/src/plugins/index_pattern_editor/public/components/index.ts +++ b/src/plugins/index_pattern_editor/public/components/index.ts @@ -6,10 +6,8 @@ * Side Public License, v 1. */ -export { - IndexPatternEditorFlyoutContent, - Props as IndexPatternEditorFlyoutContentProps, -} from './index_pattern_editor_flyout_content'; +export type { Props as IndexPatternEditorFlyoutContentProps } from './index_pattern_editor_flyout_content'; +export { IndexPatternEditorFlyoutContent } from './index_pattern_editor_flyout_content'; export { IndexPatternEditor } from './index_pattern_editor'; diff --git a/src/plugins/index_pattern_editor/public/shared_imports.ts b/src/plugins/index_pattern_editor/public/shared_imports.ts index c99d32e0c8a2..7edb7dfd0f59 100644 --- a/src/plugins/index_pattern_editor/public/shared_imports.ts +++ b/src/plugins/index_pattern_editor/public/shared_imports.ts @@ -6,14 +6,13 @@ * Side Public License, v 1. */ -export { - IndexPattern, - IndexPatternField, +export type { DataPublicPluginStart, IndexPatternSpec, GetFieldsOptions, IndexPatternAggRestrictions, } from '../../data/public'; +export { IndexPattern, IndexPatternField } from '../../data/public'; export { createKibanaReactContext, @@ -22,18 +21,20 @@ export { useKibana, } from '../../kibana_react/public'; +export type { + FormSchema, + FormHook, + ValidationFunc, + FieldConfig, + ValidationConfig, +} from '../../es_ui_shared/static/forms/hook_form_lib'; export { useForm, useFormData, useFormContext, Form, - FormSchema, UseField, - FormHook, - ValidationFunc, - FieldConfig, getFieldValidityAndErrorMessage, - ValidationConfig, } from '../../es_ui_shared/static/forms/hook_form_lib'; export { fieldValidators } from '../../es_ui_shared/static/forms/helpers'; @@ -47,4 +48,4 @@ export { SuperSelectField, } from '../../es_ui_shared/static/forms/components'; -export { HttpStart } from '../../../core/public'; +export type { HttpStart } from '../../../core/public'; diff --git a/src/plugins/index_pattern_editor/public/test_utils/test_utils.ts b/src/plugins/index_pattern_editor/public/test_utils/test_utils.ts index c8e4aedc2647..311d93d31b59 100644 --- a/src/plugins/index_pattern_editor/public/test_utils/test_utils.ts +++ b/src/plugins/index_pattern_editor/public/test_utils/test_utils.ts @@ -8,4 +8,5 @@ export { getRandomString } from '@kbn/test/jest'; -export { registerTestBed, TestBed } from '@kbn/test/jest'; +export type { TestBed } from '@kbn/test/jest'; +export { registerTestBed } from '@kbn/test/jest'; diff --git a/src/plugins/index_pattern_field_editor/__jest__/client_integration/helpers/index.ts b/src/plugins/index_pattern_field_editor/__jest__/client_integration/helpers/index.ts index 6a1f1aa74036..e8ff7eb7538f 100644 --- a/src/plugins/index_pattern_field_editor/__jest__/client_integration/helpers/index.ts +++ b/src/plugins/index_pattern_field_editor/__jest__/client_integration/helpers/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { findTestSubject, TestBed } from '@kbn/test/jest'; +export type { TestBed } from '@kbn/test/jest'; +export { findTestSubject } from '@kbn/test/jest'; export { setupEnvironment, diff --git a/src/plugins/index_pattern_field_editor/kibana.json b/src/plugins/index_pattern_field_editor/kibana.json index 898e7c564e57..df09fd56136c 100644 --- a/src/plugins/index_pattern_field_editor/kibana.json +++ b/src/plugins/index_pattern_field_editor/kibana.json @@ -5,7 +5,7 @@ "ui": true, "requiredPlugins": ["data"], "optionalPlugins": ["usageCollection"], - "requiredBundles": ["kibanaReact", "esUiShared", "usageCollection", "fieldFormats"], + "requiredBundles": ["kibanaReact", "esUiShared", "fieldFormats"], "owner": { "name": "App Services", "githubTeam": "kibana-app-services" diff --git a/src/plugins/index_pattern_field_editor/public/components/field_editor/form_fields/index.ts b/src/plugins/index_pattern_field_editor/public/components/field_editor/form_fields/index.ts index e958e1362bb0..693709729ed9 100644 --- a/src/plugins/index_pattern_field_editor/public/components/field_editor/form_fields/index.ts +++ b/src/plugins/index_pattern_field_editor/public/components/field_editor/form_fields/index.ts @@ -12,6 +12,7 @@ export { CustomLabelField } from './custom_label_field'; export { PopularityField } from './popularity_field'; -export { ScriptField, ScriptSyntaxError } from './script_field'; +export type { ScriptSyntaxError } from './script_field'; +export { ScriptField } from './script_field'; export { FormatField } from './format_field'; diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/index.ts b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/index.ts index 31d7e9589709..4cadb6e83762 100644 --- a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/index.ts +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/editors/default/index.ts @@ -9,7 +9,8 @@ import { FieldFormatEditorFactory } from '../types'; import { formatId } from './constants'; -export { defaultState, FormatEditorState } from './default'; +export type { FormatEditorState } from './default'; +export { defaultState } from './default'; export type { FormatEditorProps } from '../types'; export type { DefaultFormatEditor } from './default'; diff --git a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/index.ts b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/index.ts index 34619f53e9ee..0c23c8de616c 100644 --- a/src/plugins/index_pattern_field_editor/public/components/field_format_editor/index.ts +++ b/src/plugins/index_pattern_field_editor/public/components/field_format_editor/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { FormatSelectEditor, FormatSelectEditorProps } from './field_format_editor'; +export type { FormatSelectEditorProps } from './field_format_editor'; +export { FormatSelectEditor } from './field_format_editor'; export * from './editors'; diff --git a/src/plugins/index_pattern_field_editor/public/components/index.ts b/src/plugins/index_pattern_field_editor/public/components/index.ts index 927e28a8e3ad..e6fa42a591f5 100644 --- a/src/plugins/index_pattern_field_editor/public/components/index.ts +++ b/src/plugins/index_pattern_field_editor/public/components/index.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ -export { getDeleteFieldProvider, Props as DeleteFieldProviderProps } from './delete_field_provider'; +export type { Props as DeleteFieldProviderProps } from './delete_field_provider'; +export { getDeleteFieldProvider } from './delete_field_provider'; export * from './field_format_editor'; diff --git a/src/plugins/index_pattern_field_editor/public/index.ts b/src/plugins/index_pattern_field_editor/public/index.ts index 6546dabcb2c4..55af27fdb29e 100644 --- a/src/plugins/index_pattern_field_editor/public/index.ts +++ b/src/plugins/index_pattern_field_editor/public/index.ts @@ -25,7 +25,7 @@ export type { PluginStart as IndexPatternFieldEditorStart, } from './types'; export { DefaultFormatEditor } from './components/field_format_editor/editors/default/default'; -export { FieldFormatEditorFactory, FieldFormatEditor, FormatEditorProps } from './components'; +export type { FieldFormatEditorFactory, FieldFormatEditor, FormatEditorProps } from './components'; export function plugin() { return new IndexPatternFieldEditorPlugin(); diff --git a/src/plugins/index_pattern_field_editor/public/lib/index.ts b/src/plugins/index_pattern_field_editor/public/lib/index.ts index 336de9574c46..d9aaab77ff66 100644 --- a/src/plugins/index_pattern_field_editor/public/lib/index.ts +++ b/src/plugins/index_pattern_field_editor/public/lib/index.ts @@ -10,10 +10,8 @@ export { deserializeField } from './serialization'; export { getLinks } from './documentation'; -export { - getRuntimeFieldValidator, - RuntimeFieldPainlessError, - parseEsError, -} from './runtime_field_validation'; +export type { RuntimeFieldPainlessError } from './runtime_field_validation'; +export { getRuntimeFieldValidator, parseEsError } from './runtime_field_validation'; -export { initApi, ApiService } from './api'; +export type { ApiService } from './api'; +export { initApi } from './api'; diff --git a/src/plugins/index_pattern_field_editor/public/shared_imports.ts b/src/plugins/index_pattern_field_editor/public/shared_imports.ts index 2827928d1c06..e2154800908c 100644 --- a/src/plugins/index_pattern_field_editor/public/shared_imports.ts +++ b/src/plugins/index_pattern_field_editor/public/shared_imports.ts @@ -6,27 +6,31 @@ * Side Public License, v 1. */ -export { IndexPattern, IndexPatternField, DataPublicPluginStart } from '../../data/public'; +export type { DataPublicPluginStart } from '../../data/public'; +export { IndexPattern, IndexPatternField } from '../../data/public'; -export { UsageCollectionStart } from '../../usage_collection/public'; +export type { UsageCollectionStart } from '../../usage_collection/public'; -export { RuntimeType, RuntimeField, KBN_FIELD_TYPES, ES_FIELD_TYPES } from '../../data/common'; +export type { RuntimeType, RuntimeField } from '../../data/common'; +export { KBN_FIELD_TYPES, ES_FIELD_TYPES } from '../../data/common'; export { createKibanaReactContext, toMountPoint, CodeEditor } from '../../kibana_react/public'; export { FieldFormat } from '../../field_formats/common'; +export type { + FormSchema, + FormHook, + ValidationFunc, + FieldConfig, +} from '../../es_ui_shared/static/forms/hook_form_lib'; export { useForm, useFormData, useFormContext, useFormIsModified, Form, - FormSchema, UseField, - FormHook, - ValidationFunc, - FieldConfig, } from '../../es_ui_shared/static/forms/hook_form_lib'; export { fieldValidators } from '../../es_ui_shared/static/forms/helpers'; diff --git a/src/plugins/index_pattern_management/public/index.ts b/src/plugins/index_pattern_management/public/index.ts index 45a2f0b5a468..65b71ee6053e 100644 --- a/src/plugins/index_pattern_management/public/index.ts +++ b/src/plugins/index_pattern_management/public/index.ts @@ -19,7 +19,7 @@ */ import { PluginInitializerContext } from 'src/core/public'; import { IndexPatternManagementPlugin } from './plugin'; -export { IndexPatternManagementSetup, IndexPatternManagementStart } from './plugin'; +export type { IndexPatternManagementSetup, IndexPatternManagementStart } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { return new IndexPatternManagementPlugin(initializerContext); diff --git a/src/plugins/inspector/common/adapters/request/index.ts b/src/plugins/inspector/common/adapters/request/index.ts index 807f11569ba2..d1654ea66b93 100644 --- a/src/plugins/inspector/common/adapters/request/index.ts +++ b/src/plugins/inspector/common/adapters/request/index.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ -export { Request, RequestStatistic, RequestStatistics, RequestStatus } from './types'; +export type { Request, RequestStatistic, RequestStatistics } from './types'; +export { RequestStatus } from './types'; export { RequestAdapter } from './request_adapter'; export { RequestResponder } from './request_responder'; diff --git a/src/plugins/inspector/common/index.ts b/src/plugins/inspector/common/index.ts index e92c9b670475..995846fadd92 100644 --- a/src/plugins/inspector/common/index.ts +++ b/src/plugins/inspector/common/index.ts @@ -6,12 +6,5 @@ * Side Public License, v 1. */ -export { - Adapters, - Request, - RequestAdapter, - RequestStatistic, - RequestStatistics, - RequestStatus, - RequestResponder, -} from './adapters'; +export type { Adapters, Request, RequestStatistic, RequestStatistics } from './adapters'; +export { RequestAdapter, RequestStatus, RequestResponder } from './adapters'; diff --git a/src/plugins/inspector/public/index.ts b/src/plugins/inspector/public/index.ts index c611d13c06ca..5ad789855097 100644 --- a/src/plugins/inspector/public/index.ts +++ b/src/plugins/inspector/public/index.ts @@ -18,6 +18,7 @@ export function plugin(initializerContext: PluginInitializerContext) { return new InspectorPublicPlugin(initializerContext); } -export { InspectorPublicPlugin as Plugin, Setup, Start } from './plugin'; +export type { Setup, Start } from './plugin'; +export { InspectorPublicPlugin as Plugin } from './plugin'; export * from './types'; export * from '../common/adapters'; diff --git a/src/plugins/kibana_overview/public/index.ts b/src/plugins/kibana_overview/public/index.ts index eae86edf1d42..aef16587e3de 100644 --- a/src/plugins/kibana_overview/public/index.ts +++ b/src/plugins/kibana_overview/public/index.ts @@ -15,4 +15,4 @@ import { KibanaOverviewPlugin } from './plugin'; export function plugin() { return new KibanaOverviewPlugin(); } -export { KibanaOverviewPluginSetup, KibanaOverviewPluginStart } from './types'; +export type { KibanaOverviewPluginSetup, KibanaOverviewPluginStart } from './types'; diff --git a/src/plugins/kibana_react/public/context/index.ts b/src/plugins/kibana_react/public/context/index.ts index b34951b29883..8647a1414b9d 100644 --- a/src/plugins/kibana_react/public/context/index.ts +++ b/src/plugins/kibana_react/public/context/index.ts @@ -13,4 +13,4 @@ export { useKibana, withKibana, } from './context'; -export { KibanaReactContext, KibanaReactContextValue, KibanaServices } from './types'; +export type { KibanaReactContext, KibanaReactContextValue, KibanaServices } from './types'; diff --git a/src/plugins/kibana_react/public/exit_full_screen_button/index.tsx b/src/plugins/kibana_react/public/exit_full_screen_button/index.tsx index d2d7cbc2f570..16466f5c0f6a 100644 --- a/src/plugins/kibana_react/public/exit_full_screen_button/index.tsx +++ b/src/plugins/kibana_react/public/exit_full_screen_button/index.tsx @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { ExitFullScreenButton, ExitFullScreenButtonProps } from './exit_full_screen_button'; +export type { ExitFullScreenButtonProps } from './exit_full_screen_button'; +export { ExitFullScreenButton } from './exit_full_screen_button'; diff --git a/src/plugins/kibana_react/public/index.ts b/src/plugins/kibana_react/public/index.ts index 6fccb804c357..03e2bb5f9c27 100644 --- a/src/plugins/kibana_react/public/index.ts +++ b/src/plugins/kibana_react/public/index.ts @@ -23,7 +23,8 @@ export * from './toolbar_button'; export * from './split_panel'; export * from './react_router_navigate'; export * from './page_template'; -export { ValidatedDualRange, Value } from './validated_range'; +export type { Value } from './validated_range'; +export { ValidatedDualRange } from './validated_range'; export * from './notifications'; export { Markdown, MarkdownSimple } from './markdown'; export { reactToUiComponent, uiToReactComponent } from './adapters'; diff --git a/src/plugins/kibana_react/public/page_template/index.ts b/src/plugins/kibana_react/public/page_template/index.ts index 193dc8cd07ee..41eeaab01ef3 100644 --- a/src/plugins/kibana_react/public/page_template/index.ts +++ b/src/plugins/kibana_react/public/page_template/index.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ -export { KibanaPageTemplate, KibanaPageTemplateProps } from './page_template'; +export type { KibanaPageTemplateProps } from './page_template'; +export { KibanaPageTemplate } from './page_template'; export { KibanaPageTemplateSolutionNavAvatar } from './solution_nav'; export * from './no_data_page'; diff --git a/src/plugins/kibana_react/public/page_template/solution_nav/index.ts b/src/plugins/kibana_react/public/page_template/solution_nav/index.ts index 3dace6524fef..81c2033a7ce7 100644 --- a/src/plugins/kibana_react/public/page_template/solution_nav/index.ts +++ b/src/plugins/kibana_react/public/page_template/solution_nav/index.ts @@ -6,12 +6,9 @@ * Side Public License, v 1. */ -export { KibanaPageTemplateSolutionNav, KibanaPageTemplateSolutionNavProps } from './solution_nav'; -export { - KibanaPageTemplateSolutionNavAvatar, - KibanaPageTemplateSolutionNavAvatarProps, -} from './solution_nav_avatar'; -export { - KibanaPageTemplateSolutionNavCollapseButton, - KibanaPageTemplateSolutionNavCollapseButtonProps, -} from './solution_nav_collapse_button'; +export type { KibanaPageTemplateSolutionNavProps } from './solution_nav'; +export { KibanaPageTemplateSolutionNav } from './solution_nav'; +export type { KibanaPageTemplateSolutionNavAvatarProps } from './solution_nav_avatar'; +export { KibanaPageTemplateSolutionNavAvatar } from './solution_nav_avatar'; +export type { KibanaPageTemplateSolutionNavCollapseButtonProps } from './solution_nav_collapse_button'; +export { KibanaPageTemplateSolutionNavCollapseButton } from './solution_nav_collapse_button'; diff --git a/src/plugins/kibana_react/public/validated_range/index.ts b/src/plugins/kibana_react/public/validated_range/index.ts index d5ecfd23382b..14f4333cde24 100644 --- a/src/plugins/kibana_react/public/validated_range/index.ts +++ b/src/plugins/kibana_react/public/validated_range/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { ValidatedDualRange, Value } from './validated_dual_range'; +export type { Value } from './validated_dual_range'; +export { ValidatedDualRange } from './validated_dual_range'; diff --git a/src/plugins/kibana_utils/common/index.ts b/src/plugins/kibana_utils/common/index.ts index be00a13715fc..365ff52ac9d4 100644 --- a/src/plugins/kibana_utils/common/index.ts +++ b/src/plugins/kibana_utils/common/index.ts @@ -16,7 +16,8 @@ export * from './ui'; export * from './state_containers'; export * from './errors'; export { AbortError, abortSignalToPromise } from './abort_utils'; -export { createGetterSetter, Get, Set } from './create_getter_setter'; +export type { Get, Set } from './create_getter_setter'; +export { createGetterSetter } from './create_getter_setter'; export { distinctUntilChangedWithInitialValue } from './distinct_until_changed_with_initial_value'; export { url } from './url'; export { now } from './now'; diff --git a/src/plugins/kibana_utils/common/state_containers/index.ts b/src/plugins/kibana_utils/common/state_containers/index.ts index c96b48cc045b..8c4d3f87a068 100644 --- a/src/plugins/kibana_utils/common/state_containers/index.ts +++ b/src/plugins/kibana_utils/common/state_containers/index.ts @@ -13,7 +13,7 @@ * @packageDocumentation */ -export { +export type { BaseState, BaseStateContainer, TransitionDescription, @@ -37,7 +37,8 @@ export { PureTransition, Transition, } from './types'; -export { createStateContainer, CreateStateContainerOptions } from './create_state_container'; +export type { CreateStateContainerOptions } from './create_state_container'; +export { createStateContainer } from './create_state_container'; export { createStateContainerReactHelpers, useContainerSelector, diff --git a/src/plugins/kibana_utils/index.ts b/src/plugins/kibana_utils/index.ts index ecffc0544c7d..9b7e91b747db 100644 --- a/src/plugins/kibana_utils/index.ts +++ b/src/plugins/kibana_utils/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { createStateContainer, StateContainer, of } from './common'; +export type { StateContainer } from './common'; +export { createStateContainer, of } from './common'; diff --git a/src/plugins/kibana_utils/public/index.ts b/src/plugins/kibana_utils/public/index.ts index 0ac4c61f4a71..090c33e12137 100644 --- a/src/plugins/kibana_utils/public/index.ts +++ b/src/plugins/kibana_utils/public/index.ts @@ -12,6 +12,7 @@ import { KibanaUtilsPublicPlugin } from './plugin'; // TODO: https://github.com/elastic/kibana/issues/109893 /* eslint-disable @kbn/eslint/no_export_all */ +export type { Get, Set, UiComponent, UiComponentInstance } from '../common'; export { AbortError, abortSignalToPromise, @@ -20,11 +21,7 @@ export { Defer, fieldWildcardFilter, fieldWildcardMatcher, - Get, of, - Set, - UiComponent, - UiComponentInstance, url, createGetterSetter, } from '../common'; @@ -56,11 +53,7 @@ export { replaceUrlQuery, replaceUrlHashQuery, } from './state_management/url'; -export { - syncState, - syncStates, - createKbnUrlStateStorage, - createSessionStorageStateStorage, +export type { IStateSyncConfig, ISyncStateRef, IKbnUrlStateStorage, @@ -69,7 +62,13 @@ export { StartSyncStateFnType, StopSyncStateFnType, } from './state_sync'; -export { Configurable, CollectConfigProps } from './ui'; +export { + syncState, + syncStates, + createKbnUrlStateStorage, + createSessionStorageStateStorage, +} from './state_sync'; +export type { Configurable, CollectConfigProps } from './ui'; export { removeQueryParam, redirectWhenMissing, @@ -79,9 +78,10 @@ export { createQueryParamObservable, } from './history'; export { applyDiff } from './state_management/utils/diff_object'; -export { createStartServicesGetter, StartServicesGetter } from './core/create_start_service_getter'; +export type { StartServicesGetter } from './core/create_start_service_getter'; +export { createStartServicesGetter } from './core/create_start_service_getter'; -export { KibanaUtilsSetup } from './plugin'; +export type { KibanaUtilsSetup } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { return new KibanaUtilsPublicPlugin(initializerContext); diff --git a/src/plugins/kibana_utils/public/state_management/url/index.ts b/src/plugins/kibana_utils/public/state_management/url/index.ts index b180232b2152..7f39e9ac1b69 100644 --- a/src/plugins/kibana_utils/public/state_management/url/index.ts +++ b/src/plugins/kibana_utils/public/state_management/url/index.ts @@ -7,12 +7,12 @@ */ export { hashUrl, hashQuery, unhashUrl, unhashQuery } from './hash_unhash_url'; +export type { IKbnUrlControls } from './kbn_url_storage'; export { createKbnUrlControls, setStateToKbnUrl, getStateFromKbnUrl, getStatesFromKbnUrl, - IKbnUrlControls, } from './kbn_url_storage'; export { createKbnUrlTracker } from './kbn_url_tracker'; export { createUrlTracker } from './url_tracker'; diff --git a/src/plugins/kibana_utils/public/state_sync/index.ts b/src/plugins/kibana_utils/public/state_sync/index.ts index 2e14096c2395..603e7582c7b1 100644 --- a/src/plugins/kibana_utils/public/state_sync/index.ts +++ b/src/plugins/kibana_utils/public/state_sync/index.ts @@ -26,18 +26,15 @@ * @packageDocumentation */ -export { - createSessionStorageStateStorage, - createKbnUrlStateStorage, +export type { IKbnUrlStateStorage, ISessionStorageStateStorage, IStateStorage, } from './state_sync_state_storage'; -export { IStateSyncConfig, INullableBaseStateContainer } from './types'; export { - syncState, - syncStates, - StopSyncStateFnType, - StartSyncStateFnType, - ISyncStateRef, -} from './state_sync'; + createSessionStorageStateStorage, + createKbnUrlStateStorage, +} from './state_sync_state_storage'; +export type { IStateSyncConfig, INullableBaseStateContainer } from './types'; +export type { StopSyncStateFnType, StartSyncStateFnType, ISyncStateRef } from './state_sync'; +export { syncState, syncStates } from './state_sync'; diff --git a/src/plugins/kibana_utils/public/state_sync/state_sync_state_storage/index.ts b/src/plugins/kibana_utils/public/state_sync/state_sync_state_storage/index.ts index 8ac6c4eaaf3d..55f62b518337 100644 --- a/src/plugins/kibana_utils/public/state_sync/state_sync_state_storage/index.ts +++ b/src/plugins/kibana_utils/public/state_sync/state_sync_state_storage/index.ts @@ -6,9 +6,8 @@ * Side Public License, v 1. */ -export { IStateStorage } from './types'; -export { createKbnUrlStateStorage, IKbnUrlStateStorage } from './create_kbn_url_state_storage'; -export { - createSessionStorageStateStorage, - ISessionStorageStateStorage, -} from './create_session_storage_state_storage'; +export type { IStateStorage } from './types'; +export type { IKbnUrlStateStorage } from './create_kbn_url_state_storage'; +export { createKbnUrlStateStorage } from './create_kbn_url_state_storage'; +export type { ISessionStorageStateStorage } from './create_session_storage_state_storage'; +export { createSessionStorageStateStorage } from './create_session_storage_state_storage'; diff --git a/src/plugins/kibana_utils/public/storage/index.ts b/src/plugins/kibana_utils/public/storage/index.ts index 942374114531..26859bb86107 100644 --- a/src/plugins/kibana_utils/public/storage/index.ts +++ b/src/plugins/kibana_utils/public/storage/index.ts @@ -7,4 +7,4 @@ */ export { Storage } from './storage'; -export { IStorage, IStorageWrapper } from './types'; +export type { IStorage, IStorageWrapper } from './types'; diff --git a/src/plugins/kibana_utils/server/index.ts b/src/plugins/kibana_utils/server/index.ts index 42847042be15..2e4f7c7cc52f 100644 --- a/src/plugins/kibana_utils/server/index.ts +++ b/src/plugins/kibana_utils/server/index.ts @@ -6,14 +6,13 @@ * Side Public License, v 1. */ +export type { Get, Set } from '../common'; export { AbortError, abortSignalToPromise, createGetterSetter, fieldWildcardFilter, fieldWildcardMatcher, - Get, - Set, url, mergeMigrationFunctionMaps, } from '../common'; diff --git a/src/plugins/management/common/index.ts b/src/plugins/management/common/index.ts index c701ba846bca..77ae14c3c1d2 100644 --- a/src/plugins/management/common/index.ts +++ b/src/plugins/management/common/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { ManagementAppLocator } from './locator'; +export type { ManagementAppLocator } from './locator'; diff --git a/src/plugins/management/public/components/management_app/index.ts b/src/plugins/management/public/components/management_app/index.ts index 1a5cc3945344..aa768e383792 100644 --- a/src/plugins/management/public/components/management_app/index.ts +++ b/src/plugins/management/public/components/management_app/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { ManagementApp, ManagementAppDependencies } from './management_app'; +export type { ManagementAppDependencies } from './management_app'; +export { ManagementApp } from './management_app'; diff --git a/src/plugins/management/public/index.ts b/src/plugins/management/public/index.ts index 2f5550acbaf6..41d244ad44d5 100644 --- a/src/plugins/management/public/index.ts +++ b/src/plugins/management/public/index.ts @@ -13,9 +13,10 @@ export function plugin(initializerContext: PluginInitializerContext) { return new ManagementPlugin(initializerContext); } -export { RegisterManagementAppArgs, ManagementSection, ManagementApp } from './utils'; +export type { RegisterManagementAppArgs } from './utils'; +export { ManagementSection, ManagementApp } from './utils'; -export { +export type { ManagementAppMountParams, ManagementSetup, ManagementStart, diff --git a/src/plugins/management/public/utils/index.ts b/src/plugins/management/public/utils/index.ts index c51c6b050753..4bdf6979c28f 100644 --- a/src/plugins/management/public/utils/index.ts +++ b/src/plugins/management/public/utils/index.ts @@ -7,5 +7,7 @@ */ export { MANAGEMENT_BREADCRUMB } from './breadcrumbs'; -export { ManagementApp, RegisterManagementAppArgs } from './management_app'; -export { ManagementSection, RegisterManagementSectionArgs } from './management_section'; +export type { RegisterManagementAppArgs } from './management_app'; +export { ManagementApp } from './management_app'; +export type { RegisterManagementSectionArgs } from './management_section'; +export { ManagementSection } from './management_section'; diff --git a/src/plugins/maps_ems/public/index.ts b/src/plugins/maps_ems/public/index.ts index a4a0fc45d916..74b831e05880 100644 --- a/src/plugins/maps_ems/public/index.ts +++ b/src/plugins/maps_ems/public/index.ts @@ -12,7 +12,7 @@ import { IServiceSettings } from './service_settings'; import type { MapsEmsConfig } from '../config'; /** @public */ -export { +export type { VectorLayer, FileLayerField, FileLayer, diff --git a/src/plugins/navigation/public/index.ts b/src/plugins/navigation/public/index.ts index 21d63c72cdd6..91b68ecab644 100644 --- a/src/plugins/navigation/public/index.ts +++ b/src/plugins/navigation/public/index.ts @@ -13,9 +13,10 @@ export function plugin(initializerContext: PluginInitializerContext) { return new NavigationPublicPlugin(initializerContext); } -export { TopNavMenuData, TopNavMenu, TopNavMenuProps } from './top_nav_menu'; +export type { TopNavMenuData, TopNavMenuProps } from './top_nav_menu'; +export { TopNavMenu } from './top_nav_menu'; -export { NavigationPublicPluginSetup, NavigationPublicPluginStart } from './types'; +export type { NavigationPublicPluginSetup, NavigationPublicPluginStart } from './types'; // Export plugin after all other imports import { NavigationPublicPlugin } from './plugin'; diff --git a/src/plugins/navigation/public/top_nav_menu/index.ts b/src/plugins/navigation/public/top_nav_menu/index.ts index 19f359e60ba7..16c92aaaaf71 100644 --- a/src/plugins/navigation/public/top_nav_menu/index.ts +++ b/src/plugins/navigation/public/top_nav_menu/index.ts @@ -7,9 +7,8 @@ */ export { createTopNav } from './create_top_nav_menu'; -export { TopNavMenu, TopNavMenuProps } from './top_nav_menu'; -export { TopNavMenuData } from './top_nav_menu_data'; -export { - TopNavMenuExtensionsRegistrySetup, - TopNavMenuExtensionsRegistry, -} from './top_nav_menu_extensions_registry'; +export type { TopNavMenuProps } from './top_nav_menu'; +export { TopNavMenu } from './top_nav_menu'; +export type { TopNavMenuData } from './top_nav_menu_data'; +export type { TopNavMenuExtensionsRegistrySetup } from './top_nav_menu_extensions_registry'; +export { TopNavMenuExtensionsRegistry } from './top_nav_menu_extensions_registry'; diff --git a/src/plugins/newsfeed/public/index.ts b/src/plugins/newsfeed/public/index.ts index 324306f889d1..f9d59ca6d99d 100644 --- a/src/plugins/newsfeed/public/index.ts +++ b/src/plugins/newsfeed/public/index.ts @@ -15,13 +15,8 @@ import { import { FetchResult, NewsfeedItem } from './types'; import { NewsfeedApiEndpoint } from './lib/api'; -export { - NewsfeedPublicPluginSetup, - NewsfeedPublicPluginStart, - FetchResult, - NewsfeedItem, - NewsfeedApiEndpoint, -}; +export type { NewsfeedPublicPluginSetup, NewsfeedPublicPluginStart, FetchResult, NewsfeedItem }; +export { NewsfeedApiEndpoint }; export function plugin(initializerContext: PluginInitializerContext) { return new NewsfeedPublicPlugin(initializerContext); diff --git a/src/plugins/presentation_util/public/components/controls/control_group/index.ts b/src/plugins/presentation_util/public/components/controls/control_group/index.ts index 45a91a87a796..95988d2e8143 100644 --- a/src/plugins/presentation_util/public/components/controls/control_group/index.ts +++ b/src/plugins/presentation_util/public/components/controls/control_group/index.ts @@ -6,6 +6,6 @@ * Side Public License, v 1. */ -export { ControlGroupInput, ControlGroupOutput } from './types'; +export type { ControlGroupInput, ControlGroupOutput } from './types'; export type { ControlGroupContainer } from './embeddable/control_group_container'; export { ControlGroupContainerFactory } from './embeddable/control_group_container_factory'; diff --git a/src/plugins/presentation_util/public/components/solution_toolbar/items/index.ts b/src/plugins/presentation_util/public/components/solution_toolbar/items/index.ts index 654831e86d3f..6076dbf8cf12 100644 --- a/src/plugins/presentation_util/public/components/solution_toolbar/items/index.ts +++ b/src/plugins/presentation_util/public/components/solution_toolbar/items/index.ts @@ -9,6 +9,7 @@ export { SolutionToolbarButton } from './button'; export { SolutionToolbarPopover } from './popover'; export { AddFromLibraryButton } from './add_from_library'; -export { QuickButtonProps, QuickButtonGroup } from './quick_group'; +export type { QuickButtonProps } from './quick_group'; +export { QuickButtonGroup } from './quick_group'; export { PrimaryActionButton } from './primary_button'; export { PrimaryActionPopover } from './primary_popover'; diff --git a/src/plugins/presentation_util/public/index.ts b/src/plugins/presentation_util/public/index.ts index 478e8a7cda03..91f1e3a937f6 100644 --- a/src/plugins/presentation_util/public/index.ts +++ b/src/plugins/presentation_util/public/index.ts @@ -11,26 +11,25 @@ import { PresentationUtilPlugin } from './plugin'; -export { +export type { PresentationCapabilitiesService, PresentationDashboardsService, PresentationLabsService, - getStubPluginServices, } from './services'; +export { getStubPluginServices } from './services'; -export { +export type { KibanaPluginServiceFactory, PluginServiceFactory, - PluginServices, PluginServiceProviders, - PluginServiceProvider, - PluginServiceRegistry, KibanaPluginServiceParams, } from './services/create'; +export { PluginServices, PluginServiceProvider, PluginServiceRegistry } from './services/create'; -export { PresentationUtilPluginSetup, PresentationUtilPluginStart } from './types'; -export { SaveModalDashboardProps } from './components/types'; -export { projectIDs, ProjectID, Project } from '../common/labs'; +export type { PresentationUtilPluginSetup, PresentationUtilPluginStart } from './types'; +export type { SaveModalDashboardProps } from './components/types'; +export type { ProjectID, Project } from '../common/labs'; +export { projectIDs } from '../common/labs'; export * from '../common/lib'; export { @@ -43,12 +42,12 @@ export { export * from './components/types'; +export type { QuickButtonProps } from './components/solution_toolbar'; export { AddFromLibraryButton, PrimaryActionButton, PrimaryActionPopover, QuickButtonGroup, - QuickButtonProps, SolutionToolbar, SolutionToolbarButton, SolutionToolbarPopover, diff --git a/src/plugins/presentation_util/public/services/create/index.ts b/src/plugins/presentation_util/public/services/create/index.ts index 163e25e26bab..d616d7bee20c 100644 --- a/src/plugins/presentation_util/public/services/create/index.ts +++ b/src/plugins/presentation_util/public/services/create/index.ts @@ -9,8 +9,9 @@ import { PluginServiceRegistry } from './registry'; export { PluginServiceRegistry } from './registry'; -export { PluginServiceProvider, PluginServiceProviders } from './provider'; -export { +export type { PluginServiceProviders } from './provider'; +export { PluginServiceProvider } from './provider'; +export type { PluginServiceFactory, KibanaPluginServiceFactory, KibanaPluginServiceParams, diff --git a/src/plugins/presentation_util/public/services/index.ts b/src/plugins/presentation_util/public/services/index.ts index c7d8d2617888..cafb01594bd3 100644 --- a/src/plugins/presentation_util/public/services/index.ts +++ b/src/plugins/presentation_util/public/services/index.ts @@ -17,9 +17,9 @@ import { PresentationControlsService } from './controls'; import { PresentationDataViewsService } from './data_views'; import { PresentationDataService } from './data'; -export { PresentationCapabilitiesService } from './capabilities'; -export { PresentationDashboardsService } from './dashboards'; -export { PresentationLabsService } from './labs'; +export type { PresentationCapabilitiesService } from './capabilities'; +export type { PresentationDashboardsService } from './dashboards'; +export type { PresentationLabsService } from './labs'; export interface PresentationUtilServices { dashboards: PresentationDashboardsService; dataViews: PresentationDataViewsService; diff --git a/src/plugins/presentation_util/public/services/storybook/index.ts b/src/plugins/presentation_util/public/services/storybook/index.ts index 1639316a1fe1..a2d729f6d730 100644 --- a/src/plugins/presentation_util/public/services/storybook/index.ts +++ b/src/plugins/presentation_util/public/services/storybook/index.ts @@ -21,8 +21,9 @@ import { controlsServiceFactory } from './controls'; import { dataViewsServiceFactory } from './data_views'; import { dataServiceFactory } from './data'; -export { PluginServiceProviders, PluginServiceProvider, PluginServiceRegistry } from '../create'; -export { PresentationUtilServices } from '..'; +export type { PluginServiceProviders } from '../create'; +export { PluginServiceProvider, PluginServiceRegistry } from '../create'; +export type { PresentationUtilServices } from '..'; export interface StorybookParams { canAccessDashboards?: boolean; diff --git a/src/plugins/saved_objects/public/finder/index.ts b/src/plugins/saved_objects/public/finder/index.ts index de6a54795fce..aaf6259daca1 100644 --- a/src/plugins/saved_objects/public/finder/index.ts +++ b/src/plugins/saved_objects/public/finder/index.ts @@ -6,9 +6,5 @@ * Side Public License, v 1. */ -export { - SavedObjectMetaData, - SavedObjectFinderUi, - SavedObjectFinderUiProps, - getSavedObjectFinder, -} from './saved_object_finder'; +export type { SavedObjectMetaData, SavedObjectFinderUiProps } from './saved_object_finder'; +export { SavedObjectFinderUi, getSavedObjectFinder } from './saved_object_finder'; diff --git a/src/plugins/saved_objects/public/index.ts b/src/plugins/saved_objects/public/index.ts index bc84298a6371..d63e20f5f567 100644 --- a/src/plugins/saved_objects/public/index.ts +++ b/src/plugins/saved_objects/public/index.ts @@ -8,33 +8,24 @@ import { SavedObjectsPublicPlugin } from './plugin'; -export { - OnSaveProps, - SavedObjectSaveModal, - SavedObjectSaveModalOrigin, - OriginSaveModalProps, - SaveModalState, - SaveResult, - showSaveModal, -} from './save_modal'; -export { - getSavedObjectFinder, - SavedObjectFinderUi, - SavedObjectFinderUiProps, - SavedObjectMetaData, -} from './finder'; -export { - SavedObjectLoader, +export type { OnSaveProps, OriginSaveModalProps, SaveModalState, SaveResult } from './save_modal'; +export { SavedObjectSaveModal, SavedObjectSaveModalOrigin, showSaveModal } from './save_modal'; +export type { SavedObjectFinderUiProps, SavedObjectMetaData } from './finder'; +export { getSavedObjectFinder, SavedObjectFinderUi } from './finder'; +export type { SavedObjectLoaderFindOptions, - checkForDuplicateTitle, - saveWithConfirmation, - isErrorNonFatal, SavedObjectDecorator, SavedObjectDecoratorFactory, SavedObjectDecoratorConfig, } from './saved_object'; -export { SavedObjectSaveOpts, SavedObject, SavedObjectConfig } from './types'; +export { + SavedObjectLoader, + checkForDuplicateTitle, + saveWithConfirmation, + isErrorNonFatal, +} from './saved_object'; +export type { SavedObjectSaveOpts, SavedObject, SavedObjectConfig } from './types'; export { PER_PAGE_SETTING, LISTING_LIMIT_SETTING } from '../common'; -export { SavedObjectsStart, SavedObjectSetup } from './plugin'; +export type { SavedObjectsStart, SavedObjectSetup } from './plugin'; export const plugin = () => new SavedObjectsPublicPlugin(); diff --git a/src/plugins/saved_objects/public/save_modal/index.ts b/src/plugins/saved_objects/public/save_modal/index.ts index cd10374e5734..8c23b797a05d 100644 --- a/src/plugins/saved_objects/public/save_modal/index.ts +++ b/src/plugins/saved_objects/public/save_modal/index.ts @@ -6,6 +6,9 @@ * Side Public License, v 1. */ -export { SavedObjectSaveModal, OnSaveProps, SaveModalState } from './saved_object_save_modal'; -export { SavedObjectSaveModalOrigin, OriginSaveModalProps } from './saved_object_save_modal_origin'; -export { showSaveModal, SaveResult } from './show_saved_object_save_modal'; +export type { OnSaveProps, SaveModalState } from './saved_object_save_modal'; +export { SavedObjectSaveModal } from './saved_object_save_modal'; +export type { OriginSaveModalProps } from './saved_object_save_modal_origin'; +export { SavedObjectSaveModalOrigin } from './saved_object_save_modal_origin'; +export type { SaveResult } from './show_saved_object_save_modal'; +export { showSaveModal } from './show_saved_object_save_modal'; diff --git a/src/plugins/saved_objects/public/saved_object/decorators/index.ts b/src/plugins/saved_objects/public/saved_object/decorators/index.ts index d7aed32b5e2e..1b43ae9808bf 100644 --- a/src/plugins/saved_objects/public/saved_object/decorators/index.ts +++ b/src/plugins/saved_objects/public/saved_object/decorators/index.ts @@ -6,9 +6,6 @@ * Side Public License, v 1. */ -export { - ISavedObjectDecoratorRegistry, - SavedObjectDecoratorRegistry, - SavedObjectDecoratorConfig, -} from './registry'; -export { SavedObjectDecorator, SavedObjectDecoratorFactory } from './types'; +export type { ISavedObjectDecoratorRegistry, SavedObjectDecoratorConfig } from './registry'; +export { SavedObjectDecoratorRegistry } from './registry'; +export type { SavedObjectDecorator, SavedObjectDecoratorFactory } from './types'; diff --git a/src/plugins/saved_objects/public/saved_object/helpers/field_mapping/index.ts b/src/plugins/saved_objects/public/saved_object/helpers/field_mapping/index.ts index b8a7b7ecc31a..9a52f9b0e845 100644 --- a/src/plugins/saved_objects/public/saved_object/helpers/field_mapping/index.ts +++ b/src/plugins/saved_objects/public/saved_object/helpers/field_mapping/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export { FieldMappingSpec, MappingObject } from './types'; +export type { FieldMappingSpec, MappingObject } from './types'; export { expandShorthand } from './mapping_setup'; diff --git a/src/plugins/saved_objects/public/saved_object/index.ts b/src/plugins/saved_objects/public/saved_object/index.ts index 116999afb71a..f30730a1c39a 100644 --- a/src/plugins/saved_objects/public/saved_object/index.ts +++ b/src/plugins/saved_objects/public/saved_object/index.ts @@ -7,13 +7,14 @@ */ export { createSavedObjectClass } from './saved_object'; -export { SavedObjectLoader, SavedObjectLoaderFindOptions } from './saved_object_loader'; +export type { SavedObjectLoaderFindOptions } from './saved_object_loader'; +export { SavedObjectLoader } from './saved_object_loader'; export { checkForDuplicateTitle } from './helpers/check_for_duplicate_title'; export { saveWithConfirmation } from './helpers/save_with_confirmation'; export { isErrorNonFatal } from './helpers/save_saved_object'; -export { - SavedObjectDecoratorRegistry, +export type { SavedObjectDecoratorFactory, SavedObjectDecorator, SavedObjectDecoratorConfig, } from './decorators'; +export { SavedObjectDecoratorRegistry } from './decorators'; diff --git a/src/plugins/saved_objects_management/public/index.ts b/src/plugins/saved_objects_management/public/index.ts index 92e01ab90369..99ffae349bb4 100644 --- a/src/plugins/saved_objects_management/public/index.ts +++ b/src/plugins/saved_objects_management/public/index.ts @@ -9,18 +9,22 @@ import { PluginInitializerContext } from 'kibana/public'; import { SavedObjectsManagementPlugin } from './plugin'; -export { SavedObjectsManagementPluginSetup, SavedObjectsManagementPluginStart } from './plugin'; -export { +export type { + SavedObjectsManagementPluginSetup, + SavedObjectsManagementPluginStart, +} from './plugin'; +export type { SavedObjectsManagementActionServiceSetup, SavedObjectsManagementActionServiceStart, - SavedObjectsManagementAction, SavedObjectsManagementColumnServiceSetup, SavedObjectsManagementColumnServiceStart, SavedObjectsManagementColumn, SavedObjectsManagementRecord, } from './services'; -export { ProcessedImportResponse, processImportResponse, FailedImport } from './lib'; -export { SavedObjectRelation, SavedObjectWithMetadata, SavedObjectMetadata } from './types'; +export { SavedObjectsManagementAction } from './services'; +export type { ProcessedImportResponse, FailedImport } from './lib'; +export { processImportResponse } from './lib'; +export type { SavedObjectRelation, SavedObjectWithMetadata, SavedObjectMetadata } from './types'; export function plugin(initializerContext: PluginInitializerContext) { return new SavedObjectsManagementPlugin(); diff --git a/src/plugins/saved_objects_management/public/lib/index.ts b/src/plugins/saved_objects_management/public/lib/index.ts index e317bb5e39f7..258387c39ecd 100644 --- a/src/plugins/saved_objects_management/public/lib/index.ts +++ b/src/plugins/saved_objects_management/public/lib/index.ts @@ -14,14 +14,12 @@ export { getSavedObjectLabel } from './get_saved_object_label'; export { importFile } from './import_file'; export { parseQuery } from './parse_query'; export { resolveImportErrors } from './resolve_import_errors'; -export { - processImportResponse, - ProcessedImportResponse, - FailedImport, -} from './process_import_response'; +export type { ProcessedImportResponse, FailedImport } from './process_import_response'; +export { processImportResponse } from './process_import_response'; export { getDefaultTitle } from './get_default_title'; export { findObjects } from './find_objects'; export { bulkGetObjects } from './bulk_get_objects'; -export { extractExportDetails, SavedObjectsExportResultDetails } from './extract_export_details'; +export type { SavedObjectsExportResultDetails } from './extract_export_details'; +export { extractExportDetails } from './extract_export_details'; export { getAllowedTypes } from './get_allowed_types'; export { getTagFindReferences } from './get_tag_references'; diff --git a/src/plugins/saved_objects_management/public/services/index.ts b/src/plugins/saved_objects_management/public/services/index.ts index f3c0100d6159..c45c81d3122a 100644 --- a/src/plugins/saved_objects_management/public/services/index.ts +++ b/src/plugins/saved_objects_management/public/services/index.ts @@ -6,18 +6,15 @@ * Side Public License, v 1. */ -export { - SavedObjectsManagementActionService, +export type { SavedObjectsManagementActionServiceStart, SavedObjectsManagementActionServiceSetup, } from './action_service'; -export { - SavedObjectsManagementColumnService, +export { SavedObjectsManagementActionService } from './action_service'; +export type { SavedObjectsManagementColumnServiceStart, SavedObjectsManagementColumnServiceSetup, } from './column_service'; -export { - SavedObjectsManagementAction, - SavedObjectsManagementColumn, - SavedObjectsManagementRecord, -} from './types'; +export { SavedObjectsManagementColumnService } from './column_service'; +export type { SavedObjectsManagementColumn, SavedObjectsManagementRecord } from './types'; +export { SavedObjectsManagementAction } from './types'; diff --git a/src/plugins/saved_objects_management/public/services/types/index.ts b/src/plugins/saved_objects_management/public/services/types/index.ts index 457ade0a295e..82b45f9df33f 100644 --- a/src/plugins/saved_objects_management/public/services/types/index.ts +++ b/src/plugins/saved_objects_management/public/services/types/index.ts @@ -7,5 +7,5 @@ */ export { SavedObjectsManagementAction } from './action'; -export { SavedObjectsManagementColumn } from './column'; -export { SavedObjectsManagementRecord } from './record'; +export type { SavedObjectsManagementColumn } from './column'; +export type { SavedObjectsManagementRecord } from './record'; diff --git a/src/plugins/saved_objects_management/public/types.ts b/src/plugins/saved_objects_management/public/types.ts index cd6e3e9eaa32..61766e1cb8c1 100644 --- a/src/plugins/saved_objects_management/public/types.ts +++ b/src/plugins/saved_objects_management/public/types.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export { +export type { SavedObjectMetadata, SavedObjectWithMetadata, SavedObjectRelationKind, diff --git a/src/plugins/saved_objects_management/server/index.ts b/src/plugins/saved_objects_management/server/index.ts index b56382113e1e..942d7b0734ae 100644 --- a/src/plugins/saved_objects_management/server/index.ts +++ b/src/plugins/saved_objects_management/server/index.ts @@ -12,7 +12,7 @@ import { SavedObjectsManagementPlugin } from './plugin'; export const plugin = (context: PluginInitializerContext) => new SavedObjectsManagementPlugin(context); -export { +export type { SavedObjectsManagementPluginSetup, SavedObjectsManagementPluginStart, SavedObjectMetadata, diff --git a/src/plugins/saved_objects_management/server/services/index.ts b/src/plugins/saved_objects_management/server/services/index.ts index 7bee337f59a9..f0f6d9e7fa97 100644 --- a/src/plugins/saved_objects_management/server/services/index.ts +++ b/src/plugins/saved_objects_management/server/services/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { SavedObjectsManagement, ISavedObjectsManagement } from './management'; +export type { ISavedObjectsManagement } from './management'; +export { SavedObjectsManagement } from './management'; diff --git a/src/plugins/saved_objects_management/server/types.ts b/src/plugins/saved_objects_management/server/types.ts index 5779c6d98e35..93f6f3d09547 100644 --- a/src/plugins/saved_objects_management/server/types.ts +++ b/src/plugins/saved_objects_management/server/types.ts @@ -12,7 +12,7 @@ export interface SavedObjectsManagementPluginSetup {} // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface SavedObjectsManagementPluginStart {} -export { +export type { SavedObjectMetadata, SavedObjectWithMetadata, SavedObjectRelationKind, diff --git a/src/plugins/saved_objects_tagging_oss/common/index.ts b/src/plugins/saved_objects_tagging_oss/common/index.ts index a892f41c6931..0a8bd890614b 100644 --- a/src/plugins/saved_objects_tagging_oss/common/index.ts +++ b/src/plugins/saved_objects_tagging_oss/common/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { Tag, TagAttributes, GetAllTagsOptions, ITagsClient } from './types'; +export type { Tag, TagAttributes, GetAllTagsOptions, ITagsClient } from './types'; diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/index.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/index.ts index 6ea905b1db24..7ca7c50505f2 100644 --- a/src/plugins/saved_objects_tagging_oss/public/decorator/index.ts +++ b/src/plugins/saved_objects_tagging_oss/public/decorator/index.ts @@ -10,7 +10,7 @@ import { SavedObjectDecoratorConfig } from '../../../saved_objects/public'; import { tagDecoratorFactory, decoratorId } from './factory'; import { InternalTagDecoratedSavedObject } from './types'; -export { TagDecoratedSavedObject } from './types'; +export type { TagDecoratedSavedObject } from './types'; export const tagDecoratorConfig: SavedObjectDecoratorConfig = { id: decoratorId, diff --git a/src/plugins/saved_objects_tagging_oss/public/index.ts b/src/plugins/saved_objects_tagging_oss/public/index.ts index eb38614f9053..6e9a0bf3d832 100644 --- a/src/plugins/saved_objects_tagging_oss/public/index.ts +++ b/src/plugins/saved_objects_tagging_oss/public/index.ts @@ -9,9 +9,9 @@ import { PluginInitializerContext } from '../../../../src/core/public'; import { SavedObjectTaggingOssPlugin } from './plugin'; -export { SavedObjectTaggingOssPluginSetup, SavedObjectTaggingOssPluginStart } from './types'; +export type { SavedObjectTaggingOssPluginSetup, SavedObjectTaggingOssPluginStart } from './types'; -export { +export type { SavedObjectsTaggingApi, SavedObjectsTaggingApiUi, SavedObjectsTaggingApiUiComponent, @@ -25,7 +25,7 @@ export { SavedObjectTagDecoratorTypeGuard, } from './api'; -export { TagDecoratedSavedObject } from './decorator'; +export type { TagDecoratedSavedObject } from './decorator'; export const plugin = (initializerContext: PluginInitializerContext) => new SavedObjectTaggingOssPlugin(initializerContext); diff --git a/src/plugins/screenshot_mode/public/index.ts b/src/plugins/screenshot_mode/public/index.ts index 012f57e837f4..591ddbfdf49c 100644 --- a/src/plugins/screenshot_mode/public/index.ts +++ b/src/plugins/screenshot_mode/public/index.ts @@ -18,4 +18,4 @@ export { KBN_SCREENSHOT_MODE_ENABLED_KEY, } from '../common'; -export { ScreenshotModePluginSetup, ScreenshotModePluginStart } from './types'; +export type { ScreenshotModePluginSetup, ScreenshotModePluginStart } from './types'; diff --git a/src/plugins/screenshot_mode/server/index.ts b/src/plugins/screenshot_mode/server/index.ts index b9f19a474ccb..cc5d45b7be73 100644 --- a/src/plugins/screenshot_mode/server/index.ts +++ b/src/plugins/screenshot_mode/server/index.ts @@ -14,7 +14,7 @@ export { KBN_SCREENSHOT_MODE_ENABLED_KEY, } from '../common'; -export { +export type { ScreenshotModeRequestHandlerContext, ScreenshotModePluginSetup, ScreenshotModePluginStart, diff --git a/src/plugins/share/common/index.ts b/src/plugins/share/common/index.ts index 992ec2447855..9c5b4b4f610e 100644 --- a/src/plugins/share/common/index.ts +++ b/src/plugins/share/common/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { LocatorDefinition, LocatorPublic, useLocatorUrl, formatSearchParams } from './url_service'; +export type { LocatorDefinition, LocatorPublic } from './url_service'; +export { useLocatorUrl, formatSearchParams } from './url_service'; export type { AnonymousAccessServiceContract, AnonymousAccessState } from './anonymous_access'; diff --git a/src/plugins/share/common/url_service/locators/locator.ts b/src/plugins/share/common/url_service/locators/locator.ts index 2d33f701df59..2bacdd67875b 100644 --- a/src/plugins/share/common/url_service/locators/locator.ts +++ b/src/plugins/share/common/url_service/locators/locator.ts @@ -118,11 +118,9 @@ export class Locator

implements LocatorPublic

{ }); } - /* eslint-disable react-hooks/rules-of-hooks */ public readonly useUrl = ( params: P, getUrlParams?: LocatorGetUrlParams, deps: DependencyList = [] ): string => useLocatorUrl

(this, params, getUrlParams, deps); - /* eslint-enable react-hooks/rules-of-hooks */ } diff --git a/src/plugins/share/public/index.ts b/src/plugins/share/public/index.ts index 73b685e2cab5..97c01577993b 100644 --- a/src/plugins/share/public/index.ts +++ b/src/plugins/share/public/index.ts @@ -10,13 +10,13 @@ import type { PluginInitializerContext } from 'src/core/public'; export { CSV_QUOTE_VALUES_SETTING, CSV_SEPARATOR_SETTING } from '../common/constants'; -export { LocatorDefinition, LocatorPublic, KibanaLocation } from '../common/url_service'; +export type { LocatorDefinition, LocatorPublic, KibanaLocation } from '../common/url_service'; -export { UrlGeneratorStateMapping } from './url_generators/url_generator_definition'; +export type { UrlGeneratorStateMapping } from './url_generators/url_generator_definition'; -export { SharePluginSetup, SharePluginStart } from './plugin'; +export type { SharePluginSetup, SharePluginStart } from './plugin'; -export { +export type { ShareContext, ShareMenuProvider, ShareMenuItem, @@ -24,15 +24,15 @@ export { ShareContextMenuPanelItem, } from './types'; -export { +export type { UrlGeneratorId, UrlGeneratorState, UrlGeneratorsDefinition, UrlGeneratorContract, - UrlGeneratorsService, } from './url_generators'; +export { UrlGeneratorsService } from './url_generators'; -export { RedirectOptions } from '../common/url_service'; +export type { RedirectOptions } from '../common/url_service'; export { useLocatorUrl } from '../common/url_service/locators/use_locator_url'; import { SharePlugin } from './plugin'; diff --git a/src/plugins/share/server/index.ts b/src/plugins/share/server/index.ts index d820a362131a..73cd4cc89af7 100644 --- a/src/plugins/share/server/index.ts +++ b/src/plugins/share/server/index.ts @@ -9,7 +9,7 @@ import { PluginInitializerContext } from '../../../core/server'; import { SharePlugin } from './plugin'; -export { SharePluginSetup, SharePluginStart } from './plugin'; +export type { SharePluginSetup, SharePluginStart } from './plugin'; export { CSV_QUOTE_VALUES_SETTING, CSV_SEPARATOR_SETTING } from '../common/constants'; diff --git a/src/plugins/ui_actions/public/index.ts b/src/plugins/ui_actions/public/index.ts index 0804ed43cbe1..8a6b7ed93149 100644 --- a/src/plugins/ui_actions/public/index.ts +++ b/src/plugins/ui_actions/public/index.ts @@ -13,33 +13,29 @@ export function plugin(initializerContext: PluginInitializerContext) { return new UiActionsPlugin(initializerContext); } -export { UiActionsSetup, UiActionsStart } from './plugin'; -export { UiActionsServiceParams, UiActionsService } from './service'; -export { - Action, - ActionDefinition as UiActionsActionDefinition, - createAction, - IncompatibleActionError, -} from './actions'; +export type { UiActionsSetup, UiActionsStart } from './plugin'; +export type { UiActionsServiceParams } from './service'; +export { UiActionsService } from './service'; +export type { Action, ActionDefinition as UiActionsActionDefinition } from './actions'; +export { createAction, IncompatibleActionError } from './actions'; export { buildContextMenuForActions } from './context_menu'; -export { +export type { Presentable as UiActionsPresentable, PresentableGrouping as UiActionsPresentableGrouping, } from './util'; +export type { Trigger, RowClickContext } from './triggers'; export { - Trigger, VISUALIZE_FIELD_TRIGGER, visualizeFieldTrigger, VISUALIZE_GEO_FIELD_TRIGGER, visualizeGeoFieldTrigger, ROW_CLICK_TRIGGER, rowClickTrigger, - RowClickContext, } from './triggers'; +export type { VisualizeFieldContext } from './types'; export { - VisualizeFieldContext, ACTION_VISUALIZE_FIELD, ACTION_VISUALIZE_GEO_FIELD, ACTION_VISUALIZE_LENS_FIELD, } from './types'; -export { ActionExecutionContext, ActionExecutionMeta } from './actions'; +export type { ActionExecutionContext, ActionExecutionMeta } from './actions'; diff --git a/src/plugins/vis_default_editor/public/components/options/index.ts b/src/plugins/vis_default_editor/public/components/options/index.ts index 62ce76014f9f..4d45da690c3c 100644 --- a/src/plugins/vis_default_editor/public/components/options/index.ts +++ b/src/plugins/vis_default_editor/public/components/options/index.ts @@ -9,8 +9,10 @@ export { BasicOptions } from './basic_options'; export { SwitchOption } from './switch'; export { SelectOption } from './select'; -export { ColorRanges, SetColorRangeValue } from './color_ranges'; -export { ColorSchemaOptions, SetColorSchemaOptionsValue } from './color_schema'; +export type { SetColorRangeValue } from './color_ranges'; +export { ColorRanges } from './color_ranges'; +export type { SetColorSchemaOptionsValue } from './color_schema'; +export { ColorSchemaOptions } from './color_schema'; export { NumberInputOption } from './number_input'; export { RangeOption } from './range'; export { RequiredNumberInputOption } from './required_number_input'; diff --git a/src/plugins/vis_default_editor/public/index.ts b/src/plugins/vis_default_editor/public/index.ts index ec1f514b9f2f..d89a898467b9 100644 --- a/src/plugins/vis_default_editor/public/index.ts +++ b/src/plugins/vis_default_editor/public/index.ts @@ -17,7 +17,8 @@ export { DefaultEditorController }; export { useValidation } from './components/controls/utils'; export { PalettePicker } from './components/controls/palette_picker'; export * from './components/options'; -export { RangesParamEditor, RangeValues } from './components/controls/ranges'; +export type { RangeValues } from './components/controls/ranges'; +export { RangesParamEditor } from './components/controls/ranges'; export * from './editor_size'; export * from './utils'; diff --git a/src/plugins/vis_types/pie/public/index.ts b/src/plugins/vis_types/pie/public/index.ts index adf8b2d073f3..d7c5e9a2dfb2 100644 --- a/src/plugins/vis_types/pie/public/index.ts +++ b/src/plugins/vis_types/pie/public/index.ts @@ -9,6 +9,6 @@ import { VisTypePiePlugin } from './plugin'; export { pieVisType } from './vis_type'; -export { Dimensions, Dimension } from './types'; +export type { Dimensions, Dimension } from './types'; export const plugin = () => new VisTypePiePlugin(); diff --git a/src/plugins/vis_types/table/common/index.ts b/src/plugins/vis_types/table/common/index.ts index ad8e27c95a5e..c5737c58fdbb 100644 --- a/src/plugins/vis_types/table/common/index.ts +++ b/src/plugins/vis_types/table/common/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { AggTypes, TableVisParams, VIS_TYPE_TABLE } from './types'; +export type { TableVisParams } from './types'; +export { AggTypes, VIS_TYPE_TABLE } from './types'; diff --git a/src/plugins/vis_types/timelion/public/index.ts b/src/plugins/vis_types/timelion/public/index.ts index 8161f844e8f7..960eda3dc558 100644 --- a/src/plugins/vis_types/timelion/public/index.ts +++ b/src/plugins/vis_types/timelion/public/index.ts @@ -13,4 +13,4 @@ export function plugin(initializerContext: PluginInitializerContext) { return new Plugin(initializerContext); } -export { VisTypeTimelionPluginStart } from './plugin'; +export type { VisTypeTimelionPluginStart } from './plugin'; diff --git a/src/plugins/vis_types/timelion/server/types.ts b/src/plugins/vis_types/timelion/server/types.ts index 06b6afa613b0..0cbf2b088208 100644 --- a/src/plugins/vis_types/timelion/server/types.ts +++ b/src/plugins/vis_types/timelion/server/types.ts @@ -6,4 +6,7 @@ * Side Public License, v 1. */ -export { TimelionFunctionInterface, TimelionFunctionConfig } from './lib/classes/timelion_function'; +export type { + TimelionFunctionInterface, + TimelionFunctionConfig, +} from './lib/classes/timelion_function'; diff --git a/src/plugins/vis_types/timeseries/common/types/index.ts b/src/plugins/vis_types/timeseries/common/types/index.ts index 123b6723d8cc..5e04fee0d015 100644 --- a/src/plugins/vis_types/timeseries/common/types/index.ts +++ b/src/plugins/vis_types/timeseries/common/types/index.ts @@ -9,8 +9,8 @@ import { Filter, IndexPattern, Query } from '../../../../data/common'; import { Panel } from './panel_model'; -export { Metric, Series, Panel, MetricType } from './panel_model'; -export { TimeseriesVisData, PanelData, SeriesData, TableData } from './vis_data'; +export type { Metric, Series, Panel, MetricType } from './panel_model'; +export type { TimeseriesVisData, PanelData, SeriesData, TableData } from './vis_data'; export interface FetchedIndexPattern { indexPattern: IndexPattern | undefined | null; diff --git a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/index.ts b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/index.ts index 4920677a04a2..24b49ca8f4d4 100644 --- a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/index.ts +++ b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { IndexPatternSelect, IndexPatternSelectProps } from './index_pattern_select'; +export type { IndexPatternSelectProps } from './index_pattern_select'; +export { IndexPatternSelect } from './index_pattern_select'; diff --git a/src/plugins/vis_types/timeseries/server/index.ts b/src/plugins/vis_types/timeseries/server/index.ts index 7a10740a53d3..d6b1174177bb 100644 --- a/src/plugins/vis_types/timeseries/server/index.ts +++ b/src/plugins/vis_types/timeseries/server/index.ts @@ -10,7 +10,7 @@ import { PluginInitializerContext, PluginConfigDescriptor } from 'src/core/serve import { VisTypeTimeseriesConfig, config as configSchema } from './config'; import { VisTypeTimeseriesPlugin } from './plugin'; -export { VisTypeTimeseriesSetup } from './plugin'; +export type { VisTypeTimeseriesSetup } from './plugin'; export const config: PluginConfigDescriptor = { schema: configSchema, @@ -20,5 +20,5 @@ export function plugin(initializerContext: PluginInitializerContext) { return new VisTypeTimeseriesPlugin(initializerContext); } -export { TimeseriesVisData } from '../common/types'; +export type { TimeseriesVisData } from '../common/types'; export { isVisSeriesData, isVisTableData } from '../common/vis_data_utils'; diff --git a/src/plugins/vis_types/vega/public/vega_inspector/index.ts b/src/plugins/vis_types/vega/public/vega_inspector/index.ts index e79d2ee356ae..72dc539dc2ea 100644 --- a/src/plugins/vis_types/vega/public/vega_inspector/index.ts +++ b/src/plugins/vis_types/vega/public/vega_inspector/index.ts @@ -6,8 +6,5 @@ * Side Public License, v 1. */ -export { - createInspectorAdapters, - getVegaInspectorView, - VegaInspectorAdapters, -} from './vega_inspector'; +export type { VegaInspectorAdapters } from './vega_inspector'; +export { createInspectorAdapters, getVegaInspectorView } from './vega_inspector'; diff --git a/src/plugins/vis_types/vega/server/index.ts b/src/plugins/vis_types/vega/server/index.ts index 9c448f6c618d..62bc9a1494ac 100644 --- a/src/plugins/vis_types/vega/server/index.ts +++ b/src/plugins/vis_types/vega/server/index.ts @@ -22,4 +22,4 @@ export function plugin(initializerContext: PluginInitializerContext) { return new VisTypeVegaPlugin(initializerContext); } -export { VisTypeVegaPluginStart, VisTypeVegaPluginSetup } from './types'; +export type { VisTypeVegaPluginStart, VisTypeVegaPluginSetup } from './types'; diff --git a/src/plugins/vis_types/xy/public/editor/components/common/index.ts b/src/plugins/vis_types/xy/public/editor/components/common/index.ts index 5eec1fff7b7a..5a91629c5061 100644 --- a/src/plugins/vis_types/xy/public/editor/components/common/index.ts +++ b/src/plugins/vis_types/xy/public/editor/components/common/index.ts @@ -7,4 +7,5 @@ */ export { TruncateLabelsOption } from './truncate_labels'; -export { ValidationWrapper, ValidationVisOptionsProps } from './validation_wrapper'; +export type { ValidationVisOptionsProps } from './validation_wrapper'; +export { ValidationWrapper } from './validation_wrapper'; diff --git a/src/plugins/vis_types/xy/public/expression_functions/index.ts b/src/plugins/vis_types/xy/public/expression_functions/index.ts index 32c50e3adff1..4d6b2305a365 100644 --- a/src/plugins/vis_types/xy/public/expression_functions/index.ts +++ b/src/plugins/vis_types/xy/public/expression_functions/index.ts @@ -8,10 +8,17 @@ export { visTypeXyVisFn } from './xy_vis_fn'; -export { categoryAxis, ExpressionValueCategoryAxis } from './category_axis'; -export { timeMarker, ExpressionValueTimeMarker } from './time_marker'; -export { valueAxis, ExpressionValueValueAxis } from './value_axis'; -export { seriesParam, ExpressionValueSeriesParam } from './series_param'; -export { thresholdLine, ExpressionValueThresholdLine } from './threshold_line'; -export { label, ExpressionValueLabel } from './label'; -export { visScale, ExpressionValueScale } from './vis_scale'; +export type { ExpressionValueCategoryAxis } from './category_axis'; +export { categoryAxis } from './category_axis'; +export type { ExpressionValueTimeMarker } from './time_marker'; +export { timeMarker } from './time_marker'; +export type { ExpressionValueValueAxis } from './value_axis'; +export { valueAxis } from './value_axis'; +export type { ExpressionValueSeriesParam } from './series_param'; +export { seriesParam } from './series_param'; +export type { ExpressionValueThresholdLine } from './threshold_line'; +export { thresholdLine } from './threshold_line'; +export type { ExpressionValueLabel } from './label'; +export { label } from './label'; +export type { ExpressionValueScale } from './vis_scale'; +export { visScale } from './vis_scale'; diff --git a/src/plugins/vis_types/xy/public/index.ts b/src/plugins/vis_types/xy/public/index.ts index 1ee96fab3525..41a8e08fa1ad 100644 --- a/src/plugins/vis_types/xy/public/index.ts +++ b/src/plugins/vis_types/xy/public/index.ts @@ -11,11 +11,11 @@ import { VisTypeXyPlugin as Plugin } from './plugin'; -export { VisTypeXyPluginSetup } from './plugin'; +export type { VisTypeXyPluginSetup } from './plugin'; // TODO: Remove when vis_type_vislib is removed // https://github.com/elastic/kibana/issues/56143 -export { +export type { CategoryAxis, ThresholdLine, ValueAxis, @@ -23,9 +23,8 @@ export { SeriesParam, Dimension, Dimensions, - ScaleType, - AxisType, } from './types'; +export { ScaleType, AxisType } from './types'; export type { ValidationVisOptionsProps } from './editor/components/common/validation_wrapper'; export { TruncateLabelsOption } from './editor/components/common/truncate_labels'; export { getPositions } from './editor/positions'; diff --git a/src/plugins/visualizations/public/index.ts b/src/plugins/visualizations/public/index.ts index e6ea3cd48955..8ae0c426689a 100644 --- a/src/plugins/visualizations/public/index.ts +++ b/src/plugins/visualizations/public/index.ts @@ -22,17 +22,17 @@ export { VisualizationContainer } from './components'; export { getVisSchemas } from './vis_schemas'; /** @public types */ -export { VisualizationsSetup, VisualizationsStart }; +export type { VisualizationsSetup, VisualizationsStart }; export { VisGroups } from './vis_types/vis_groups_enum'; export type { BaseVisType, VisTypeAlias, VisTypeDefinition, Schema, ISchemas } from './vis_types'; export type { Vis, SerializedVis, SerializedVisData, VisData } from './vis'; export type VisualizeEmbeddableFactoryContract = PublicContract; export type VisualizeEmbeddableContract = PublicContract; -export { VisualizeInput } from './embeddable'; -export { SchemaConfig } from './vis_schemas'; +export type { VisualizeInput } from './embeddable'; +export type { SchemaConfig } from './vis_schemas'; export { updateOldState } from './legacy/vis_update_state'; export type { PersistedState } from './persisted_state'; -export { +export type { ISavedVis, VisSavedObject, VisToExpressionAst, @@ -40,11 +40,15 @@ export { VisEditorOptionsProps, GetVisOptions, } from './types'; -export { VisualizationListItem, VisualizationStage } from './vis_types/vis_type_alias_registry'; +export type { + VisualizationListItem, + VisualizationStage, +} from './vis_types/vis_type_alias_registry'; export { VISUALIZE_ENABLE_LABS_SETTING } from '../common/constants'; -export { SavedVisState, VisParams, prepareLogTable, Dimension } from '../common'; -export { ExpressionValueVisDimension } from '../common/expression_functions/vis_dimension'; -export { +export type { SavedVisState, VisParams, Dimension } from '../common'; +export { prepareLogTable } from '../common'; +export type { ExpressionValueVisDimension } from '../common/expression_functions/vis_dimension'; +export type { ExpressionValueXYDimension, DateHistogramParams, FakeParams, diff --git a/src/plugins/visualizations/public/vis_types/types_service.ts b/src/plugins/visualizations/public/vis_types/types_service.ts index 567da272dfd0..ae8ba8b8ad51 100644 --- a/src/plugins/visualizations/public/vis_types/types_service.ts +++ b/src/plugins/visualizations/public/vis_types/types_service.ts @@ -110,4 +110,4 @@ export type TypesSetup = ReturnType; export type TypesStart = ReturnType; /** @public types */ -export { VisTypeAlias }; +export type { VisTypeAlias }; diff --git a/src/plugins/visualizations/server/index.ts b/src/plugins/visualizations/server/index.ts index d093a6829f30..f10caf44b3cc 100644 --- a/src/plugins/visualizations/server/index.ts +++ b/src/plugins/visualizations/server/index.ts @@ -18,4 +18,4 @@ export function plugin(initializerContext: PluginInitializerContext) { return new VisualizationsPlugin(initializerContext); } -export { VisualizationsPluginSetup, VisualizationsPluginStart } from './types'; +export type { VisualizationsPluginSetup, VisualizationsPluginStart } from './types'; diff --git a/src/plugins/visualize/public/application/types.ts b/src/plugins/visualize/public/application/types.ts index e77520c962d8..b15b521f6251 100644 --- a/src/plugins/visualize/public/application/types.ts +++ b/src/plugins/visualize/public/application/types.ts @@ -145,4 +145,4 @@ export interface EditorRenderProps { linked: boolean; } -export { PureVisState }; +export type { PureVisState }; diff --git a/src/plugins/visualize/public/index.ts b/src/plugins/visualize/public/index.ts index ff1b2ba4c3bf..dd77987f6a72 100644 --- a/src/plugins/visualize/public/index.ts +++ b/src/plugins/visualize/public/index.ts @@ -11,9 +11,9 @@ import { VisualizePlugin, VisualizePluginSetup } from './plugin'; export { VisualizeConstants } from './application/visualize_constants'; -export { IEditorController, EditorRenderProps } from './application/types'; +export type { IEditorController, EditorRenderProps } from './application/types'; -export { VisualizePluginSetup }; +export type { VisualizePluginSetup }; export const plugin = (context: PluginInitializerContext) => { return new VisualizePlugin(context); diff --git a/test/functional/services/common/index.ts b/test/functional/services/common/index.ts index 95f58027fd5f..c5f442c19154 100644 --- a/test/functional/services/common/index.ts +++ b/test/functional/services/common/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { BrowserProvider, Browser } from './browser'; +export type { Browser } from './browser'; +export { BrowserProvider } from './browser'; export { FailureDebuggingProvider } from './failure_debugging'; export { FindProvider } from './find'; export { ScreenshotsService } from './screenshots'; diff --git a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/public/index.ts b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/public/index.ts index 22afda2fdce1..897fbf832d56 100644 --- a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/public/index.ts +++ b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/public/index.ts @@ -8,7 +8,7 @@ import { PluginInitializer, PluginInitializerContext } from 'src/core/public'; import { Plugin, StartDeps } from './plugin'; -export { StartDeps }; +export type { StartDeps }; export const plugin: PluginInitializer = ( initializerContext: PluginInitializerContext diff --git a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/public/types.ts b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/public/types.ts index a9b597ebf1e0..02872843cf8b 100644 --- a/test/interpreter_functional/plugins/kbn_tp_run_pipeline/public/types.ts +++ b/test/interpreter_functional/plugins/kbn_tp_run_pipeline/public/types.ts @@ -9,4 +9,5 @@ import { ExpressionsStart, ExpressionRenderHandler } from 'src/plugins/expressions/public'; import { Adapters } from 'src/plugins/inspector/public'; -export { ExpressionsStart, ExpressionRenderHandler, Adapters }; +export type { ExpressionsStart, Adapters }; +export { ExpressionRenderHandler }; diff --git a/test/plugin_functional/plugins/core_plugin_a/server/index.ts b/test/plugin_functional/plugins/core_plugin_a/server/index.ts index f4b9f96f1bcd..7fad3cf7a9e3 100644 --- a/test/plugin_functional/plugins/core_plugin_a/server/index.ts +++ b/test/plugin_functional/plugins/core_plugin_a/server/index.ts @@ -7,6 +7,6 @@ */ import { CorePluginAPlugin } from './plugin'; -export { PluginAApiRequestContext } from './plugin'; +export type { PluginAApiRequestContext } from './plugin'; export const plugin = () => new CorePluginAPlugin(); diff --git a/x-pack/examples/reporting_example/common/index.ts b/x-pack/examples/reporting_example/common/index.ts index 893bd4dee8ae..991ec30a03b1 100644 --- a/x-pack/examples/reporting_example/common/index.ts +++ b/x-pack/examples/reporting_example/common/index.ts @@ -8,10 +8,7 @@ export const PLUGIN_ID = 'reportingExample'; export const PLUGIN_NAME = 'reportingExample'; -export { MyForwardableState } from './types'; +export type { MyForwardableState } from './types'; -export { - REPORTING_EXAMPLE_LOCATOR_ID, - ReportingExampleLocatorDefinition, - ReportingExampleLocatorParams, -} from './locator'; +export type { ReportingExampleLocatorParams } from './locator'; +export { REPORTING_EXAMPLE_LOCATOR_ID, ReportingExampleLocatorDefinition } from './locator'; diff --git a/x-pack/examples/reporting_example/public/index.ts b/x-pack/examples/reporting_example/public/index.ts index f9f749e2b0cd..c4c0a9b48f2c 100644 --- a/x-pack/examples/reporting_example/public/index.ts +++ b/x-pack/examples/reporting_example/public/index.ts @@ -10,4 +10,4 @@ import { ReportingExamplePlugin } from './plugin'; export function plugin() { return new ReportingExamplePlugin(); } -export { PluginSetup, PluginStart } from './types'; +export type { PluginSetup, PluginStart } from './types'; diff --git a/x-pack/examples/ui_actions_enhanced_examples/public/drilldowns/dashboard_to_discover_drilldown/index.ts b/x-pack/examples/ui_actions_enhanced_examples/public/drilldowns/dashboard_to_discover_drilldown/index.ts index f6e1f2886414..f6c6f48e1774 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/public/drilldowns/dashboard_to_discover_drilldown/index.ts +++ b/x-pack/examples/ui_actions_enhanced_examples/public/drilldowns/dashboard_to_discover_drilldown/index.ts @@ -6,11 +6,9 @@ */ export { SAMPLE_DASHBOARD_TO_DISCOVER_DRILLDOWN } from './constants'; -export { - DashboardToDiscoverDrilldown, - Params as DashboardToDiscoverDrilldownParams, -} from './drilldown'; -export { +export type { Params as DashboardToDiscoverDrilldownParams } from './drilldown'; +export { DashboardToDiscoverDrilldown } from './drilldown'; +export type { ActionContext as DashboardToDiscoverActionContext, Config as DashboardToDiscoverConfig, } from './types'; diff --git a/x-pack/plugins/actions/server/builtin_action_types/index.ts b/x-pack/plugins/actions/server/builtin_action_types/index.ts index 3351a36b3834..9988e951ae86 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/index.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/index.ts @@ -25,36 +25,30 @@ import { getActionType as getJiraActionType } from './jira'; import { getActionType as getResilientActionType } from './resilient'; import { getActionType as getTeamsActionType } from './teams'; import { ENABLE_ITOM } from '../constants/connectors'; -export { ActionParamsType as EmailActionParams, ActionTypeId as EmailActionTypeId } from './email'; +export type { ActionParamsType as EmailActionParams } from './email'; +export { ActionTypeId as EmailActionTypeId } from './email'; +export type { ActionParamsType as IndexActionParams } from './es_index'; +export { ActionTypeId as IndexActionTypeId } from './es_index'; +export type { ActionParamsType as PagerDutyActionParams } from './pagerduty'; +export { ActionTypeId as PagerDutyActionTypeId } from './pagerduty'; +export type { ActionParamsType as ServerLogActionParams } from './server_log'; +export { ActionTypeId as ServerLogActionTypeId } from './server_log'; +export type { ActionParamsType as SlackActionParams } from './slack'; +export { ActionTypeId as SlackActionTypeId } from './slack'; +export type { ActionParamsType as WebhookActionParams } from './webhook'; +export { ActionTypeId as WebhookActionTypeId } from './webhook'; +export type { ActionParamsType as ServiceNowActionParams } from './servicenow'; export { - ActionParamsType as IndexActionParams, - ActionTypeId as IndexActionTypeId, -} from './es_index'; -export { - ActionParamsType as PagerDutyActionParams, - ActionTypeId as PagerDutyActionTypeId, -} from './pagerduty'; -export { - ActionParamsType as ServerLogActionParams, - ActionTypeId as ServerLogActionTypeId, -} from './server_log'; -export { ActionParamsType as SlackActionParams, ActionTypeId as SlackActionTypeId } from './slack'; -export { - ActionParamsType as WebhookActionParams, - ActionTypeId as WebhookActionTypeId, -} from './webhook'; -export { - ActionParamsType as ServiceNowActionParams, ServiceNowITSMActionTypeId, ServiceNowSIRActionTypeId, ServiceNowITOMActionTypeId, } from './servicenow'; -export { ActionParamsType as JiraActionParams, ActionTypeId as JiraActionTypeId } from './jira'; -export { - ActionParamsType as ResilientActionParams, - ActionTypeId as ResilientActionTypeId, -} from './resilient'; -export { ActionParamsType as TeamsActionParams, ActionTypeId as TeamsActionTypeId } from './teams'; +export type { ActionParamsType as JiraActionParams } from './jira'; +export { ActionTypeId as JiraActionTypeId } from './jira'; +export type { ActionParamsType as ResilientActionParams } from './resilient'; +export { ActionTypeId as ResilientActionTypeId } from './resilient'; +export type { ActionParamsType as TeamsActionParams } from './teams'; +export { ActionTypeId as TeamsActionTypeId } from './teams'; export function registerBuiltInActionTypes({ actionsConfigUtils: configurationUtilities, diff --git a/x-pack/plugins/actions/server/lib/errors/index.ts b/x-pack/plugins/actions/server/lib/errors/index.ts index e4035213359a..bae42db6dd1e 100644 --- a/x-pack/plugins/actions/server/lib/errors/index.ts +++ b/x-pack/plugins/actions/server/lib/errors/index.ts @@ -13,4 +13,5 @@ export function isErrorThatHandlesItsOwnResponse( return typeof (e as ErrorThatHandlesItsOwnResponse).sendResponse === 'function'; } -export { ActionTypeDisabledError, ActionTypeDisabledReason } from './action_type_disabled'; +export type { ActionTypeDisabledReason } from './action_type_disabled'; +export { ActionTypeDisabledError } from './action_type_disabled'; diff --git a/x-pack/plugins/actions/server/lib/index.ts b/x-pack/plugins/actions/server/lib/index.ts index c52a8b14ee6d..d981b3bcc82e 100644 --- a/x-pack/plugins/actions/server/lib/index.ts +++ b/x-pack/plugins/actions/server/lib/index.ts @@ -13,8 +13,10 @@ export { validateConnector, } from './validate_with_schema'; export { TaskRunnerFactory } from './task_runner_factory'; -export { ActionExecutor, ActionExecutorContract } from './action_executor'; -export { ILicenseState, LicenseState } from './license_state'; +export type { ActionExecutorContract } from './action_executor'; +export { ActionExecutor } from './action_executor'; +export type { ILicenseState } from './license_state'; +export { LicenseState } from './license_state'; export { verifyApiAccess } from './verify_api_access'; export { getActionTypeFeatureUsageName } from './get_action_type_feature_usage_name'; export { spaceIdToNamespace } from './space_id_to_namespace'; @@ -22,13 +24,10 @@ export { extractSavedObjectReferences, injectSavedObjectReferences, } from './action_task_params_utils'; +export type { ActionTypeDisabledReason } from './errors'; +export { ActionTypeDisabledError, isErrorThatHandlesItsOwnResponse } from './errors'; +export type { ActionExecutionSource } from './action_execution_source'; export { - ActionTypeDisabledError, - ActionTypeDisabledReason, - isErrorThatHandlesItsOwnResponse, -} from './errors'; -export { - ActionExecutionSource, asSavedObjectExecutionSource, isSavedObjectExecutionSource, asHttpRequestExecutionSource, diff --git a/x-pack/plugins/actions/server/types.ts b/x-pack/plugins/actions/server/types.ts index 627cd7028e5b..9b7a8280cd27 100644 --- a/x-pack/plugins/actions/server/types.ts +++ b/x-pack/plugins/actions/server/types.ts @@ -20,11 +20,11 @@ import { } from '../../../../src/core/server'; import { ActionTypeExecutorResult } from '../common'; import { TaskInfo } from './lib/action_executor'; -export { ActionTypeExecutorResult } from '../common'; -export { GetFieldsByIssueTypeResponse as JiraGetFieldsResponse } from './builtin_action_types/jira/types'; -export { GetCommonFieldsResponse as ServiceNowGetFieldsResponse } from './builtin_action_types/servicenow/types'; -export { GetCommonFieldsResponse as ResilientGetFieldsResponse } from './builtin_action_types/resilient/types'; -export { SwimlanePublicConfigurationType } from './builtin_action_types/swimlane/types'; +export type { ActionTypeExecutorResult } from '../common'; +export type { GetFieldsByIssueTypeResponse as JiraGetFieldsResponse } from './builtin_action_types/jira/types'; +export type { GetCommonFieldsResponse as ServiceNowGetFieldsResponse } from './builtin_action_types/servicenow/types'; +export type { GetCommonFieldsResponse as ResilientGetFieldsResponse } from './builtin_action_types/resilient/types'; +export type { SwimlanePublicConfigurationType } from './builtin_action_types/swimlane/types'; export type WithoutQueryAndParams = Pick>; export type GetServicesFunction = (request: KibanaRequest) => Services; export type ActionTypeRegistryContract = PublicMethodsOf; diff --git a/x-pack/plugins/alerting/server/alert_instance/index.ts b/x-pack/plugins/alerting/server/alert_instance/index.ts index c342c2f6bd05..7b5dd064c5dc 100644 --- a/x-pack/plugins/alerting/server/alert_instance/index.ts +++ b/x-pack/plugins/alerting/server/alert_instance/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { AlertInstance, PublicAlertInstance } from './alert_instance'; +export type { PublicAlertInstance } from './alert_instance'; +export { AlertInstance } from './alert_instance'; export { createAlertInstanceFactory } from './create_alert_instance_factory'; diff --git a/x-pack/plugins/alerting/server/index.ts b/x-pack/plugins/alerting/server/index.ts index 2ddb6ff711c4..8ed91cc82141 100644 --- a/x-pack/plugins/alerting/server/index.ts +++ b/x-pack/plugins/alerting/server/index.ts @@ -30,9 +30,9 @@ export type { RuleParamsAndRefs, } from './types'; export { DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT } from './config'; -export { PluginSetupContract, PluginStartContract } from './plugin'; -export { FindResult } from './rules_client'; -export { PublicAlertInstance as AlertInstance } from './alert_instance'; +export type { PluginSetupContract, PluginStartContract } from './plugin'; +export type { FindResult } from './rules_client'; +export type { PublicAlertInstance as AlertInstance } from './alert_instance'; export { parseDuration } from './lib'; export { getEsErrorMessage } from './lib/errors'; export { diff --git a/x-pack/plugins/alerting/server/lib/errors/index.ts b/x-pack/plugins/alerting/server/lib/errors/index.ts index 66db39916832..36ca30bc95ba 100644 --- a/x-pack/plugins/alerting/server/lib/errors/index.ts +++ b/x-pack/plugins/alerting/server/lib/errors/index.ts @@ -14,5 +14,7 @@ export function isErrorThatHandlesItsOwnResponse( return typeof (e as ErrorThatHandlesItsOwnResponse).sendResponse === 'function'; } -export { ErrorThatHandlesItsOwnResponse, ElasticsearchError, getEsErrorMessage }; -export { AlertTypeDisabledError, AlertTypeDisabledReason } from './alert_type_disabled'; +export type { ErrorThatHandlesItsOwnResponse, ElasticsearchError }; +export { getEsErrorMessage }; +export type { AlertTypeDisabledReason } from './alert_type_disabled'; +export { AlertTypeDisabledError } from './alert_type_disabled'; diff --git a/x-pack/plugins/alerting/server/lib/index.ts b/x-pack/plugins/alerting/server/lib/index.ts index ed55548307e7..24f2513e1c65 100644 --- a/x-pack/plugins/alerting/server/lib/index.ts +++ b/x-pack/plugins/alerting/server/lib/index.ts @@ -6,18 +6,18 @@ */ export { parseDuration, validateDurationSchema } from '../../common/parse_duration'; -export { ILicenseState, LicenseState } from './license_state'; +export type { ILicenseState } from './license_state'; +export { LicenseState } from './license_state'; export { validateAlertTypeParams } from './validate_alert_type_params'; export { getAlertNotifyWhenType } from './get_alert_notify_when_type'; export { verifyApiAccess } from './license_api_access'; export { ErrorWithReason, getReasonFromError, isErrorWithReason } from './error_with_reason'; -export { - AlertTypeDisabledError, +export type { AlertTypeDisabledReason, ErrorThatHandlesItsOwnResponse, - isErrorThatHandlesItsOwnResponse, ElasticsearchError, } from './errors'; +export { AlertTypeDisabledError, isErrorThatHandlesItsOwnResponse } from './errors'; export { executionStatusFromState, executionStatusFromError, diff --git a/x-pack/plugins/alerting/server/routes/lib/index.ts b/x-pack/plugins/alerting/server/routes/lib/index.ts index dc8f3ac3b5de..2c14660ae47d 100644 --- a/x-pack/plugins/alerting/server/routes/lib/index.ts +++ b/x-pack/plugins/alerting/server/routes/lib/index.ts @@ -11,6 +11,10 @@ export { isSecurityPluginDisabledError, } from './error_handler'; export { renameKeys } from './rename_keys'; -export { AsApiContract, RewriteRequestCase, RewriteResponseCase } from './rewrite_request_case'; +export type { + AsApiContract, + RewriteRequestCase, + RewriteResponseCase, +} from './rewrite_request_case'; export { verifyAccessAndContext } from './verify_access_and_context'; export { countUsageOfPredefinedIds } from './count_usage_of_predefined_ids'; diff --git a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts index 7df1ccf1fb18..4f741ceb46f4 100644 --- a/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts +++ b/x-pack/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts @@ -7,12 +7,12 @@ import * as t from 'io-ts'; import { PackagePolicyConfigRecordEntry } from '../../../../../fleet/common'; -export { +export type { PackagePolicyCreateExtensionComponentProps, PackagePolicyEditExtensionComponentProps, } from '../../../../../fleet/public'; -export { +export type { NewPackagePolicy, PackagePolicy, PackagePolicyConfigRecordEntry, diff --git a/x-pack/plugins/apm/public/index.ts b/x-pack/plugins/apm/public/index.ts index 2734269b9cff..9b2175dd465b 100644 --- a/x-pack/plugins/apm/public/index.ts +++ b/x-pack/plugins/apm/public/index.ts @@ -23,4 +23,4 @@ export const plugin: PluginInitializer = ( pluginInitializerContext: PluginInitializerContext ) => new ApmPlugin(pluginInitializerContext); -export { ApmPluginSetup, ApmPluginStart }; +export type { ApmPluginSetup, ApmPluginStart }; diff --git a/x-pack/plugins/apm/server/index.ts b/x-pack/plugins/apm/server/index.ts index 4b5c2b5d6134..a3ee1874e448 100644 --- a/x-pack/plugins/apm/server/index.ts +++ b/x-pack/plugins/apm/server/index.ts @@ -112,11 +112,11 @@ export const plugin = (initContext: PluginInitializerContext) => export { APM_SERVER_FEATURE_ID } from '../common/alert_types'; export { APMPlugin } from './plugin'; -export { APMPluginSetup } from './types'; -export { +export type { APMPluginSetup } from './types'; +export type { APMServerRouteRepository, APIEndpoint, } from './routes/get_global_apm_server_route_repository'; -export { APMRouteHandlerResources } from './routes/typings'; +export type { APMRouteHandlerResources } from './routes/typings'; export type { ProcessorEvent } from '../common/processor_event'; diff --git a/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts b/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts index 107493af1a0c..a37720cbc379 100644 --- a/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts +++ b/x-pack/plugins/apm/server/lib/settings/apm_indices/get_apm_indices.ts @@ -16,7 +16,7 @@ import { APMRouteHandlerResources } from '../../../routes/typings'; import { withApmSpan } from '../../../utils/with_apm_span'; import { ApmIndicesConfig } from '../../../../../observability/common/typings'; -export { ApmIndicesConfig }; +export type { ApmIndicesConfig }; type ISavedObjectsClient = Pick; diff --git a/x-pack/plugins/banners/common/index.ts b/x-pack/plugins/banners/common/index.ts index a4c38a58ab57..348d42adb7d8 100644 --- a/x-pack/plugins/banners/common/index.ts +++ b/x-pack/plugins/banners/common/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { BannerInfoResponse, BannerPlacement, BannerConfiguration } from './types'; +export type { BannerInfoResponse, BannerPlacement, BannerConfiguration } from './types'; diff --git a/x-pack/plugins/canvas/canvas_plugin_src/expression_types/embeddable.ts b/x-pack/plugins/canvas/canvas_plugin_src/expression_types/embeddable.ts index ac2e8e8babee..66cb95a4a210 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/expression_types/embeddable.ts +++ b/x-pack/plugins/canvas/canvas_plugin_src/expression_types/embeddable.ts @@ -10,7 +10,8 @@ import { EmbeddableInput } from '../../../../../src/plugins/embeddable/common/'; import { EmbeddableTypes } from './embeddable_types'; export const EmbeddableExpressionType = 'embeddable'; -export { EmbeddableTypes, EmbeddableInput }; +export type { EmbeddableInput }; +export { EmbeddableTypes }; export interface EmbeddableExpression { /** diff --git a/x-pack/plugins/canvas/common/index.ts b/x-pack/plugins/canvas/common/index.ts index 5bae69e8601b..51a661f6e8d1 100644 --- a/x-pack/plugins/canvas/common/index.ts +++ b/x-pack/plugins/canvas/common/index.ts @@ -9,4 +9,5 @@ export const UI_SETTINGS = { ENABLE_LABS_UI: 'labs:canvas:enable_ui', }; -export { CANVAS_APP_LOCATOR, CanvasAppLocator, CanvasAppLocatorParams } from './locator'; +export type { CanvasAppLocator, CanvasAppLocatorParams } from './locator'; +export { CANVAS_APP_LOCATOR } from './locator'; diff --git a/x-pack/plugins/canvas/public/components/color_manager/index.ts b/x-pack/plugins/canvas/public/components/color_manager/index.ts index 17856a88bcc0..937afeb43800 100644 --- a/x-pack/plugins/canvas/public/components/color_manager/index.ts +++ b/x-pack/plugins/canvas/public/components/color_manager/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ColorManager, Props } from './color_manager'; +export type { Props } from './color_manager'; +export { ColorManager } from './color_manager'; diff --git a/x-pack/plugins/canvas/public/components/color_picker/index.ts b/x-pack/plugins/canvas/public/components/color_picker/index.ts index ba411db1129e..709b3535b5d5 100644 --- a/x-pack/plugins/canvas/public/components/color_picker/index.ts +++ b/x-pack/plugins/canvas/public/components/color_picker/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ColorPicker, Props } from './color_picker'; +export type { Props } from './color_picker'; +export { ColorPicker } from './color_picker'; diff --git a/x-pack/plugins/canvas/public/components/color_picker_popover/index.ts b/x-pack/plugins/canvas/public/components/color_picker_popover/index.ts index 76663397ff69..08bf41f2fbc0 100644 --- a/x-pack/plugins/canvas/public/components/color_picker_popover/index.ts +++ b/x-pack/plugins/canvas/public/components/color_picker_popover/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ColorPickerPopover, Props } from './color_picker_popover'; +export type { Props } from './color_picker_popover'; +export { ColorPickerPopover } from './color_picker_popover'; diff --git a/x-pack/plugins/canvas/public/components/embeddable_flyout/index.ts b/x-pack/plugins/canvas/public/components/embeddable_flyout/index.ts index 6acc4051e1ec..98943a820e37 100644 --- a/x-pack/plugins/canvas/public/components/embeddable_flyout/index.ts +++ b/x-pack/plugins/canvas/public/components/embeddable_flyout/index.ts @@ -6,7 +6,5 @@ */ export { EmbeddableFlyoutPortal, AddEmbeddablePanel } from './flyout'; -export { - AddEmbeddableFlyout as AddEmbeddableFlyoutComponent, - Props as AddEmbeddableFlyoutComponentProps, -} from './flyout.component'; +export type { Props as AddEmbeddableFlyoutComponentProps } from './flyout.component'; +export { AddEmbeddableFlyout as AddEmbeddableFlyoutComponent } from './flyout.component'; diff --git a/x-pack/plugins/canvas/public/components/paginate/index.tsx b/x-pack/plugins/canvas/public/components/paginate/index.tsx index f320860bd903..12717a07f4cf 100644 --- a/x-pack/plugins/canvas/public/components/paginate/index.tsx +++ b/x-pack/plugins/canvas/public/components/paginate/index.tsx @@ -9,7 +9,7 @@ import React, { useState, useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import { Paginate as Component, PaginateProps, PaginateChildProps } from './paginate'; -export { PaginateProps, PaginateChildProps }; +export type { PaginateProps, PaginateChildProps }; export interface InPaginateProps { perPage?: number; startPage?: number; diff --git a/x-pack/plugins/canvas/public/components/popover/index.ts b/x-pack/plugins/canvas/public/components/popover/index.ts index e1d8a5c63c28..f9d7e3c0501a 100644 --- a/x-pack/plugins/canvas/public/components/popover/index.ts +++ b/x-pack/plugins/canvas/public/components/popover/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { Popover, ClosePopoverFn } from './popover'; +export type { ClosePopoverFn } from './popover'; +export { Popover } from './popover'; diff --git a/x-pack/plugins/canvas/public/components/saved_elements_modal/index.ts b/x-pack/plugins/canvas/public/components/saved_elements_modal/index.ts index 9656dfa8ad48..b4b5d78646aa 100644 --- a/x-pack/plugins/canvas/public/components/saved_elements_modal/index.ts +++ b/x-pack/plugins/canvas/public/components/saved_elements_modal/index.ts @@ -6,7 +6,5 @@ */ export { SavedElementsModal } from './saved_elements_modal'; -export { - SavedElementsModal as SavedElementsModalComponent, - Props as SavedElementsModalComponentProps, -} from './saved_elements_modal.component'; +export type { Props as SavedElementsModalComponentProps } from './saved_elements_modal.component'; +export { SavedElementsModal as SavedElementsModalComponent } from './saved_elements_modal.component'; diff --git a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.tsx b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.tsx index 5ff3f8dd5bb8..9b7a6435f5f5 100644 --- a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.tsx +++ b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/flyout.tsx @@ -20,7 +20,7 @@ import { CanvasRenderedWorkpad } from '../../../../../shareable_runtime/types'; import { renderFunctionNames } from '../../../../../shareable_runtime/supported_renderers'; import { OnCloseFn } from '../share_menu.component'; -export { OnDownloadFn, OnCopyFn } from './flyout.component'; +export type { OnDownloadFn, OnCopyFn } from './flyout.component'; const getUnsupportedRenderers = (state: State) => { const renderers: string[] = []; diff --git a/x-pack/plugins/canvas/public/index.ts b/x-pack/plugins/canvas/public/index.ts index a15b15fcae33..95d4333c6e9e 100644 --- a/x-pack/plugins/canvas/public/index.ts +++ b/x-pack/plugins/canvas/public/index.ts @@ -10,7 +10,7 @@ import { CoreStart } from '../../../../src/core/public'; import { CanvasServices } from './services'; import { CanvasSetup, CanvasStart, CanvasStartDeps, CanvasPlugin } from './plugin'; -export { CanvasSetup, CanvasStart }; +export type { CanvasSetup, CanvasStart }; export interface WithKibanaProps { kibana: { diff --git a/x-pack/plugins/canvas/public/plugin.tsx b/x-pack/plugins/canvas/public/plugin.tsx index 723d1afea286..5d1f05fdbe8b 100644 --- a/x-pack/plugins/canvas/public/plugin.tsx +++ b/x-pack/plugins/canvas/public/plugin.tsx @@ -37,7 +37,7 @@ import { getPluginApi, CanvasApi } from './plugin_api'; import { setupExpressions } from './setup_expressions'; import { pluginServiceRegistry } from './services/kibana'; -export { CoreStart, CoreSetup }; +export type { CoreStart, CoreSetup }; /** * These are the private interfaces for the services your plugin depends on. diff --git a/x-pack/plugins/canvas/public/routes/workpad/index.tsx b/x-pack/plugins/canvas/public/routes/workpad/index.tsx index 0b6153bc06af..1b46a5cf78df 100644 --- a/x-pack/plugins/canvas/public/routes/workpad/index.tsx +++ b/x-pack/plugins/canvas/public/routes/workpad/index.tsx @@ -9,7 +9,8 @@ import { RouteComponentProps } from 'react-router-dom'; export { WorkpadRoute, ExportWorkpadRoute } from './workpad_route'; -export { WorkpadRoutingContext, WorkpadRoutingContextType } from './workpad_routing_context'; +export type { WorkpadRoutingContextType } from './workpad_routing_context'; +export { WorkpadRoutingContext } from './workpad_routing_context'; export interface WorkpadRouteParams { id: string; diff --git a/x-pack/plugins/canvas/public/services/legacy/index.ts b/x-pack/plugins/canvas/public/services/legacy/index.ts index fdc4e30cabe5..82ef3f248f7f 100644 --- a/x-pack/plugins/canvas/public/services/legacy/index.ts +++ b/x-pack/plugins/canvas/public/services/legacy/index.ts @@ -10,7 +10,7 @@ import { CoreSetup, CoreStart, AppUpdater } from '../../../../../../src/core/pub import { CanvasSetupDeps, CanvasStartDeps } from '../../plugin'; import { searchServiceFactory } from './search'; -export { SearchService } from './search'; +export type { SearchService } from './search'; export { ExpressionsService } from '../../../../../../src/plugins/expressions/common'; export * from './context'; diff --git a/x-pack/plugins/canvas/server/mocks/index.ts b/x-pack/plugins/canvas/server/mocks/index.ts index 1cb39c690df9..f3d3ef955d0e 100644 --- a/x-pack/plugins/canvas/server/mocks/index.ts +++ b/x-pack/plugins/canvas/server/mocks/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { workpadRouteContextMock, MockWorkpadRouteContext } from './workpad_route_context'; +export type { MockWorkpadRouteContext } from './workpad_route_context'; +export { workpadRouteContextMock } from './workpad_route_context'; diff --git a/x-pack/plugins/cases/public/common/shared_imports.ts b/x-pack/plugins/cases/public/common/shared_imports.ts index 4641fcfa2167..21040543fae6 100644 --- a/x-pack/plugins/cases/public/common/shared_imports.ts +++ b/x-pack/plugins/cases/public/common/shared_imports.ts @@ -5,31 +5,33 @@ * 2.0. */ +export type { + FieldHook, + FieldValidateResponse, + FormData, + FormHook, + FormSchema, + ValidationError, + ValidationFunc, + FieldConfig, + ValidationConfig, +} from '../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; export { getUseField, getFieldValidityAndErrorMessage, - FieldHook, - FieldValidateResponse, FIELD_TYPES, Form, - FormData, FormDataProvider, - FormHook, - FormSchema, UseField, UseMultiFields, useForm, useFormContext, useFormData, - ValidationError, - ValidationFunc, VALIDATION_TYPES, - FieldConfig, - ValidationConfig, } from '../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; export { Field, SelectField, } from '../../../../../src/plugins/es_ui_shared/static/forms/components'; export { fieldValidators } from '../../../../../src/plugins/es_ui_shared/static/forms/helpers'; -export { ERROR_CODE } from '../../../../../src/plugins/es_ui_shared/static/forms/helpers/field_validators/types'; +export type { ERROR_CODE } from '../../../../../src/plugins/es_ui_shared/static/forms/helpers/field_validators/types'; diff --git a/x-pack/plugins/cases/public/components/connectors/types.ts b/x-pack/plugins/cases/public/components/connectors/types.ts index 5bbd77c79090..8bc978152b79 100644 --- a/x-pack/plugins/cases/public/components/connectors/types.ts +++ b/x-pack/plugins/cases/public/components/connectors/types.ts @@ -15,7 +15,7 @@ import { } from '../../../common'; import { CaseActionConnector } from '../types'; -export { ThirdPartyField as AllThirdPartyFields } from '../../../common'; +export type { ThirdPartyField as AllThirdPartyFields } from '../../../common'; export interface ThirdPartyField { label: string; diff --git a/x-pack/plugins/cases/public/components/types.ts b/x-pack/plugins/cases/public/components/types.ts index 07ab5814b082..71c846eb922d 100644 --- a/x-pack/plugins/cases/public/components/types.ts +++ b/x-pack/plugins/cases/public/components/types.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { CaseActionConnector } from '../../common'; +export type { CaseActionConnector } from '../../common'; diff --git a/x-pack/plugins/cases/public/containers/configure/types.ts b/x-pack/plugins/cases/public/containers/configure/types.ts index 61c81a8ce97c..5ee09add196b 100644 --- a/x-pack/plugins/cases/public/containers/configure/types.ts +++ b/x-pack/plugins/cases/public/containers/configure/types.ts @@ -17,7 +17,7 @@ import { ThirdPartyField, } from '../../../common'; -export { +export type { ActionConnector, ActionTypeConnector, ActionType, diff --git a/x-pack/plugins/cases/server/client/index.ts b/x-pack/plugins/cases/server/client/index.ts index 7904e65ca627..5560d535f971 100644 --- a/x-pack/plugins/cases/server/client/index.ts +++ b/x-pack/plugins/cases/server/client/index.ts @@ -7,6 +7,6 @@ export { CasesClient } from './client'; export { CasesClientInternal } from './client_internal'; -export { CasesClientArgs } from './types'; +export type { CasesClientArgs } from './types'; export { createCasesClient } from './client'; export { createCasesClientInternal } from './client_internal'; diff --git a/x-pack/plugins/cases/server/connectors/types.ts b/x-pack/plugins/cases/server/connectors/types.ts index a8673c126258..62b2c8e6f155 100644 --- a/x-pack/plugins/cases/server/connectors/types.ts +++ b/x-pack/plugins/cases/server/connectors/types.ts @@ -11,7 +11,7 @@ import { CasesClientGetAlertsResponse } from '../client/alerts/types'; import { CasesClientFactory } from '../client/factory'; import { RegisterActionType } from '../types'; -export { +export type { ContextTypeGeneratedAlertType, CommentSchemaType, ContextTypeAlertSchemaType, diff --git a/x-pack/plugins/cases/server/index.ts b/x-pack/plugins/cases/server/index.ts index 5e433b46b80e..57db6e5565ff 100644 --- a/x-pack/plugins/cases/server/index.ts +++ b/x-pack/plugins/cases/server/index.ts @@ -22,4 +22,4 @@ export const config: PluginConfigDescriptor = { export const plugin = (initializerContext: PluginInitializerContext) => new CasePlugin(initializerContext); -export { PluginStartContract } from './plugin'; +export type { PluginStartContract } from './plugin'; diff --git a/x-pack/plugins/cases/server/saved_object_types/migrations/index.ts b/x-pack/plugins/cases/server/saved_object_types/migrations/index.ts index a4f50fbfcde5..b0f9c7d2145d 100644 --- a/x-pack/plugins/cases/server/saved_object_types/migrations/index.ts +++ b/x-pack/plugins/cases/server/saved_object_types/migrations/index.ts @@ -14,7 +14,8 @@ import { SECURITY_SOLUTION_OWNER } from '../../../common'; export { caseMigrations } from './cases'; export { configureMigrations } from './configuration'; export { userActionsMigrations } from './user_actions'; -export { createCommentsMigrations, CreateCommentsMigrationsDeps } from './comments'; +export type { CreateCommentsMigrationsDeps } from './comments'; +export { createCommentsMigrations } from './comments'; export interface SanitizedCaseOwner { owner: string; diff --git a/x-pack/plugins/cases/server/services/index.ts b/x-pack/plugins/cases/server/services/index.ts index f910099c0cc2..a1cb5d8138c4 100644 --- a/x-pack/plugins/cases/server/services/index.ts +++ b/x-pack/plugins/cases/server/services/index.ts @@ -12,7 +12,8 @@ export { CasesService } from './cases'; export { CaseConfigureService } from './configure'; export { CaseUserActionService } from './user_actions'; export { ConnectorMappingsService } from './connector_mappings'; -export { AlertService, AlertServiceContract } from './alerts'; +export type { AlertServiceContract } from './alerts'; +export { AlertService } from './alerts'; export { AttachmentService } from './attachments'; export interface ClientArgs { diff --git a/x-pack/plugins/cloud/public/index.ts b/x-pack/plugins/cloud/public/index.ts index 9f4f6b979c34..d51def6fa664 100644 --- a/x-pack/plugins/cloud/public/index.ts +++ b/x-pack/plugins/cloud/public/index.ts @@ -8,7 +8,7 @@ import { PluginInitializerContext } from '../../../../src/core/public'; import { CloudPlugin } from './plugin'; -export { CloudSetup, CloudConfigType } from './plugin'; +export type { CloudSetup, CloudConfigType } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { return new CloudPlugin(initializerContext); } diff --git a/x-pack/plugins/cloud/server/index.ts b/x-pack/plugins/cloud/server/index.ts index 8d212bb4e159..eda2fa0a7324 100644 --- a/x-pack/plugins/cloud/server/index.ts +++ b/x-pack/plugins/cloud/server/index.ts @@ -8,7 +8,7 @@ import { PluginInitializerContext } from 'src/core/server'; import { CloudPlugin } from './plugin'; -export { CloudSetup } from './plugin'; +export type { CloudSetup } from './plugin'; export { config } from './config'; export const plugin = (initializerContext: PluginInitializerContext) => { return new CloudPlugin(initializerContext); diff --git a/x-pack/plugins/dashboard_enhanced/common/drilldowns/dashboard_drilldown/index.ts b/x-pack/plugins/dashboard_enhanced/common/drilldowns/dashboard_drilldown/index.ts index dae19cf02e23..fde3b5b06de2 100644 --- a/x-pack/plugins/dashboard_enhanced/common/drilldowns/dashboard_drilldown/index.ts +++ b/x-pack/plugins/dashboard_enhanced/common/drilldowns/dashboard_drilldown/index.ts @@ -7,4 +7,4 @@ export { createExtract, createInject } from './dashboard_drilldown_persistable_state'; export { EMBEDDABLE_TO_DASHBOARD_DRILLDOWN } from './constants'; -export { DrilldownConfig } from './types'; +export type { DrilldownConfig } from './types'; diff --git a/x-pack/plugins/dashboard_enhanced/public/index.ts b/x-pack/plugins/dashboard_enhanced/public/index.ts index 82b0fc322bb8..545696abb0ac 100644 --- a/x-pack/plugins/dashboard_enhanced/public/index.ts +++ b/x-pack/plugins/dashboard_enhanced/public/index.ts @@ -8,18 +8,18 @@ import { PluginInitializerContext } from 'src/core/public'; import { DashboardEnhancedPlugin } from './plugin'; -export { +export type { SetupContract as DashboardEnhancedSetupContract, SetupDependencies as DashboardEnhancedSetupDependencies, StartContract as DashboardEnhancedStartContract, StartDependencies as DashboardEnhancedStartDependencies, } from './plugin'; -export { - AbstractDashboardDrilldown as DashboardEnhancedAbstractDashboardDrilldown, +export type { AbstractDashboardDrilldownConfig as DashboardEnhancedAbstractDashboardDrilldownConfig, AbstractDashboardDrilldownParams as DashboardEnhancedAbstractDashboardDrilldownParams, } from './services/drilldowns/abstract_dashboard_drilldown'; +export { AbstractDashboardDrilldown as DashboardEnhancedAbstractDashboardDrilldown } from './services/drilldowns/abstract_dashboard_drilldown'; export function plugin(context: PluginInitializerContext) { return new DashboardEnhancedPlugin(context); diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/index.ts b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/index.ts index ffdce9e91d15..9215f067fc85 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/index.ts +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/index.ts @@ -5,7 +5,5 @@ * 2.0. */ -export { - CollectConfigContainer, - DashboardDrilldownCollectConfigProps, -} from './collect_config_container'; +export type { DashboardDrilldownCollectConfigProps } from './collect_config_container'; +export { CollectConfigContainer } from './collect_config_container'; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/index.ts b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/index.ts index 3acea2f76d73..3b76303bda38 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/index.ts +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/index.ts @@ -5,8 +5,6 @@ * 2.0. */ -export { - AbstractDashboardDrilldown, - Params as AbstractDashboardDrilldownParams, -} from './abstract_dashboard_drilldown'; -export { Config as AbstractDashboardDrilldownConfig } from './types'; +export type { Params as AbstractDashboardDrilldownParams } from './abstract_dashboard_drilldown'; +export { AbstractDashboardDrilldown } from './abstract_dashboard_drilldown'; +export type { Config as AbstractDashboardDrilldownConfig } from './types'; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/index.ts b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/index.ts index 3a0389ac2b54..f7d98d768139 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/index.ts +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/index.ts @@ -5,8 +5,5 @@ * 2.0. */ -export { - FlyoutCreateDrilldownAction, - OpenFlyoutAddDrilldownParams, - OPEN_FLYOUT_ADD_DRILLDOWN, -} from './flyout_create_drilldown'; +export type { OpenFlyoutAddDrilldownParams } from './flyout_create_drilldown'; +export { FlyoutCreateDrilldownAction, OPEN_FLYOUT_ADD_DRILLDOWN } from './flyout_create_drilldown'; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/index.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/index.tsx index c150c55120e5..76d61a7367d7 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/index.tsx +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/index.tsx @@ -5,8 +5,5 @@ * 2.0. */ -export { - FlyoutEditDrilldownAction, - FlyoutEditDrilldownParams, - OPEN_FLYOUT_EDIT_DRILLDOWN, -} from './flyout_edit_drilldown'; +export type { FlyoutEditDrilldownParams } from './flyout_edit_drilldown'; +export { FlyoutEditDrilldownAction, OPEN_FLYOUT_EDIT_DRILLDOWN } from './flyout_edit_drilldown'; diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/index.ts b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/index.ts index 423007d548db..3a34de6299fc 100644 --- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/index.ts +++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/index.ts @@ -6,7 +6,5 @@ */ export { EMBEDDABLE_TO_DASHBOARD_DRILLDOWN } from './constants'; -export { - EmbeddableToDashboardDrilldown, - Params as EmbeddableToDashboardDrilldownParams, -} from './embeddable_to_dashboard_drilldown'; +export type { Params as EmbeddableToDashboardDrilldownParams } from './embeddable_to_dashboard_drilldown'; +export { EmbeddableToDashboardDrilldown } from './embeddable_to_dashboard_drilldown'; diff --git a/x-pack/plugins/dashboard_enhanced/server/index.ts b/x-pack/plugins/dashboard_enhanced/server/index.ts index 1f4659c2c781..3351cd954790 100644 --- a/x-pack/plugins/dashboard_enhanced/server/index.ts +++ b/x-pack/plugins/dashboard_enhanced/server/index.ts @@ -8,7 +8,7 @@ import { PluginInitializerContext } from 'src/core/server'; import { DashboardEnhancedPlugin } from './plugin'; -export { +export type { SetupContract as DashboardEnhancedSetupContract, SetupDependencies as DashboardEnhancedSetupDependencies, StartContract as DashboardEnhancedStartContract, diff --git a/x-pack/plugins/data_enhanced/public/index.ts b/x-pack/plugins/data_enhanced/public/index.ts index c3adf19fabe1..38b8d7d5c5fd 100644 --- a/x-pack/plugins/data_enhanced/public/index.ts +++ b/x-pack/plugins/data_enhanced/public/index.ts @@ -12,7 +12,7 @@ import { ConfigSchema } from '../config'; export const plugin = (initializerContext: PluginInitializerContext) => new DataEnhancedPlugin(initializerContext); -export { DataEnhancedSetup, DataEnhancedStart }; +export type { DataEnhancedSetup, DataEnhancedStart }; export { ENHANCED_ES_SEARCH_STRATEGY, diff --git a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/index.tsx b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/index.tsx index f57ad73c3c76..2970c75e651d 100644 --- a/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/index.tsx +++ b/x-pack/plugins/data_enhanced/public/search/sessions_mgmt/components/index.tsx @@ -9,7 +9,8 @@ import { EuiLinkProps, EuiText, EuiTextProps } from '@elastic/eui'; import React from 'react'; import extendSessionIcon from '../icons/extend_session.svg'; -export { OnActionComplete, PopoverActionsMenu } from './actions'; +export type { OnActionComplete } from './actions'; +export { PopoverActionsMenu } from './actions'; export const TableText = ({ children, ...props }: EuiTextProps) => { return ( diff --git a/x-pack/plugins/data_enhanced/public/search/ui/connected_search_session_indicator/index.ts b/x-pack/plugins/data_enhanced/public/search/ui/connected_search_session_indicator/index.ts index 122321691439..fec61f811548 100644 --- a/x-pack/plugins/data_enhanced/public/search/ui/connected_search_session_indicator/index.ts +++ b/x-pack/plugins/data_enhanced/public/search/ui/connected_search_session_indicator/index.ts @@ -5,7 +5,5 @@ * 2.0. */ -export { - SearchSessionIndicatorDeps, - createConnectedSearchSessionIndicator, -} from './connected_search_session_indicator'; +export type { SearchSessionIndicatorDeps } from './connected_search_session_indicator'; +export { createConnectedSearchSessionIndicator } from './connected_search_session_indicator'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/index.ts b/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/index.ts index 862128f2e856..834813ddc241 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/index.ts @@ -13,4 +13,4 @@ export { export { CombinedFieldsReadOnlyForm } from './combined_fields_read_only_form'; export { CombinedFieldsForm } from './combined_fields_form'; -export { CombinedField } from './types'; +export type { CombinedField } from './types'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_chart/index.ts b/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_chart/index.ts index 97b42053b34e..1b69f9b82516 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_chart/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_chart/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { DocumentCountChart, DocumentCountChartPoint } from './document_count_chart'; +export type { DocumentCountChartPoint } from './document_count_chart'; +export { DocumentCountChart } from './document_count_chart'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/multi_select_picker/index.ts b/x-pack/plugins/data_visualizer/public/application/common/components/multi_select_picker/index.ts index 9d32228e1c4b..a42ce68d9aa1 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/multi_select_picker/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/multi_select_picker/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { MultiSelectPicker, Option } from './multi_select_picker'; +export type { Option } from './multi_select_picker'; +export { MultiSelectPicker } from './multi_select_picker'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/index.ts b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/index.ts index 1dca4b7bf225..24c36f97d763 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ResultsLinks, ResultLink } from './results_links'; +export type { ResultLink } from './results_links'; +export { ResultsLinks } from './results_links'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_count_stats/index.ts b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_count_stats/index.ts index d841ee2959f6..ccd7c6b73a57 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_count_stats/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/field_count_stats/index.ts @@ -5,9 +5,7 @@ * 2.0. */ -export { TotalFieldsCount, TotalFieldsCountProps, TotalFieldsStats } from './total_fields_count'; -export { - MetricFieldsCount, - MetricFieldsCountProps, - MetricFieldsStats, -} from './metric_fields_count'; +export type { TotalFieldsCountProps, TotalFieldsStats } from './total_fields_count'; +export { TotalFieldsCount } from './total_fields_count'; +export type { MetricFieldsCountProps, MetricFieldsStats } from './metric_fields_count'; +export { MetricFieldsCount } from './metric_fields_count'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/metric_distribution_chart/index.ts b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/metric_distribution_chart/index.ts index 72947f2953cb..5012426e8f7c 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/metric_distribution_chart/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/components/metric_distribution_chart/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { MetricDistributionChart, MetricDistributionChartData } from './metric_distribution_chart'; +export type { MetricDistributionChartData } from './metric_distribution_chart'; +export { MetricDistributionChart } from './metric_distribution_chart'; export { buildChartDataFromStats } from './metric_distribution_chart_data_builder'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/index.ts b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/index.ts index 3009470af485..a8aae70ccfc6 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { DataVisualizerTable, ItemIdToExpandedRowMap } from './data_visualizer_stats_table'; +export type { ItemIdToExpandedRowMap } from './data_visualizer_stats_table'; +export { DataVisualizerTable } from './data_visualizer_stats_table'; diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/index.ts b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/index.ts index 171d029482e2..00f8ac0c74eb 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/stats_table/types/index.ts @@ -5,11 +5,10 @@ * 2.0. */ -export { FieldDataRowProps } from './field_data_row'; -export { +export type { FieldDataRowProps } from './field_data_row'; +export type { FieldVisConfig, FileBasedFieldVisConfig, MetricFieldVisStats, - isFileBasedFieldVisConfig, - isIndexBasedFieldVisConfig, } from './field_vis_config'; +export { isFileBasedFieldVisConfig, isIndexBasedFieldVisConfig } from './field_vis_config'; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_progress/index.ts b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_progress/index.ts index fe2d6ab7d826..65ebab329a83 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_progress/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/import_progress/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ImportProgress, IMPORT_STATUS, Statuses } from './import_progress'; +export type { Statuses } from './import_progress'; +export { ImportProgress, IMPORT_STATUS } from './import_progress'; diff --git a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/index.ts b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/index.ts index ca87d73b6a75..4cd3755726ad 100644 --- a/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/file_data_visualizer/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { FileDataVisualizer, FileDataVisualizerSpec } from './file_data_visualizer'; +export type { FileDataVisualizerSpec } from './file_data_visualizer'; +export { FileDataVisualizer } from './file_data_visualizer'; diff --git a/x-pack/plugins/data_visualizer/public/application/index.ts b/x-pack/plugins/data_visualizer/public/application/index.ts index 6229f61be85e..7e84bd84adf6 100644 --- a/x-pack/plugins/data_visualizer/public/application/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/index.ts @@ -5,9 +5,10 @@ * 2.0. */ -export { FileDataVisualizer, FileDataVisualizerSpec } from './file_data_visualizer'; -export { - IndexDataVisualizer, +export type { FileDataVisualizerSpec } from './file_data_visualizer'; +export { FileDataVisualizer } from './file_data_visualizer'; +export type { IndexDataVisualizerSpec, IndexDataVisualizerViewProps, } from './index_data_visualizer'; +export { IndexDataVisualizer } from './index_data_visualizer'; diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/index.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/index.tsx index c79df59ee3f6..14ad77e2adc3 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/index.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/index.tsx @@ -6,4 +6,5 @@ */ export { FullTimeRangeSelector } from './full_time_range_selector'; -export { getTimeFilterRange, TimeRange } from './full_time_range_selector_service'; +export type { TimeRange } from './full_time_range_selector_service'; +export { getTimeFilterRange } from './full_time_range_selector_service'; diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index.ts index bcdef0966039..9bb579f7af55 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index.ts @@ -5,7 +5,5 @@ * 2.0. */ -export { - IndexDataVisualizerViewProps, - IndexDataVisualizerView, -} from './index_data_visualizer_view'; +export type { IndexDataVisualizerViewProps } from './index_data_visualizer_view'; +export { IndexDataVisualizerView } from './index_data_visualizer_view'; diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index.ts index 77b6f9b5ab18..82abdf185f9a 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { IndexDataVisualizer, IndexDataVisualizerSpec } from './index_data_visualizer'; +export type { IndexDataVisualizerSpec } from './index_data_visualizer'; +export { IndexDataVisualizer } from './index_data_visualizer'; export type { IndexDataVisualizerViewProps } from './components/index_data_visualizer_view'; diff --git a/x-pack/plugins/data_visualizer/public/index.ts b/x-pack/plugins/data_visualizer/public/index.ts index 1a045f144c01..4a579f4e3abc 100644 --- a/x-pack/plugins/data_visualizer/public/index.ts +++ b/x-pack/plugins/data_visualizer/public/index.ts @@ -11,7 +11,7 @@ export function plugin() { return new DataVisualizerPlugin(); } -export { DataVisualizerPluginStart } from './plugin'; +export type { DataVisualizerPluginStart } from './plugin'; export type { FileDataVisualizerSpec, diff --git a/x-pack/plugins/data_visualizer/public/lazy_load_bundle/lazy/index.ts b/x-pack/plugins/data_visualizer/public/lazy_load_bundle/lazy/index.ts index a895a0eb9838..0001f912bff0 100644 --- a/x-pack/plugins/data_visualizer/public/lazy_load_bundle/lazy/index.ts +++ b/x-pack/plugins/data_visualizer/public/lazy_load_bundle/lazy/index.ts @@ -5,9 +5,5 @@ * 2.0. */ -export { - FileDataVisualizer, - IndexDataVisualizer, - FileDataVisualizerSpec, - IndexDataVisualizerSpec, -} from '../../application'; +export type { FileDataVisualizerSpec, IndexDataVisualizerSpec } from '../../application'; +export { FileDataVisualizer, IndexDataVisualizer } from '../../application'; diff --git a/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx b/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx index 4c46b8400876..163a2130f657 100644 --- a/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx +++ b/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx @@ -93,7 +93,6 @@ export class UrlDrilldown implements Drilldown { - // eslint-disable-next-line react-hooks/rules-of-hooks const variables = React.useMemo(() => this.getVariableList(context), [context]); return ( diff --git a/x-pack/plugins/embeddable_enhanced/public/index.ts b/x-pack/plugins/embeddable_enhanced/public/index.ts index 0512bedd2a57..8c64f376754a 100644 --- a/x-pack/plugins/embeddable_enhanced/public/index.ts +++ b/x-pack/plugins/embeddable_enhanced/public/index.ts @@ -8,7 +8,7 @@ import { PluginInitializerContext } from 'src/core/public'; import { EmbeddableEnhancedPlugin } from './plugin'; -export { +export type { SetupContract as EmbeddableEnhancedSetupContract, SetupDependencies as EmbeddableEnhancedSetupDependencies, StartContract as EmbeddableEnhancedStartContract, @@ -19,6 +19,6 @@ export function plugin(context: PluginInitializerContext) { return new EmbeddableEnhancedPlugin(context); } -export { EnhancedEmbeddable, EnhancedEmbeddableContext } from './types'; +export type { EnhancedEmbeddable, EnhancedEmbeddableContext } from './types'; export { isEnhancedEmbeddable } from './embeddables'; export { drilldownGrouping as embeddableEnhancedDrilldownGrouping } from './actions'; diff --git a/x-pack/plugins/encrypted_saved_objects/server/crypto/index.ts b/x-pack/plugins/encrypted_saved_objects/server/crypto/index.ts index 31086f56c3b8..532702f21319 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/crypto/index.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/crypto/index.ts @@ -5,12 +5,11 @@ * 2.0. */ -export { - EncryptedSavedObjectsService, +export type { EncryptedSavedObjectTypeRegistration, - descriptorToArray, SavedObjectDescriptor, } from './encrypted_saved_objects_service'; +export { EncryptedSavedObjectsService, descriptorToArray } from './encrypted_saved_objects_service'; export { EncryptionError, EncryptionErrorOperation } from './encryption_error'; export { EncryptedSavedObjectAttributesDefinition } from './encrypted_saved_object_type_definition'; export { EncryptionKeyRotationService } from './encryption_key_rotation_service'; diff --git a/x-pack/plugins/encrypted_saved_objects/server/index.ts b/x-pack/plugins/encrypted_saved_objects/server/index.ts index d462f06939f6..873c8c0d52cb 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/index.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/index.ts @@ -10,9 +10,10 @@ import type { PluginConfigDescriptor, PluginInitializerContext } from 'src/core/ import { ConfigSchema } from './config'; import { EncryptedSavedObjectsPlugin } from './plugin'; -export { EncryptedSavedObjectTypeRegistration, EncryptionError } from './crypto'; -export { EncryptedSavedObjectsPluginSetup, EncryptedSavedObjectsPluginStart } from './plugin'; -export { EncryptedSavedObjectsClient } from './saved_objects'; +export type { EncryptedSavedObjectTypeRegistration } from './crypto'; +export { EncryptionError } from './crypto'; +export type { EncryptedSavedObjectsPluginSetup, EncryptedSavedObjectsPluginStart } from './plugin'; +export type { EncryptedSavedObjectsClient } from './saved_objects'; export type { IsMigrationNeededPredicate } from './create_migration'; export const config: PluginConfigDescriptor = { diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/types.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/types.ts index ca3e67129846..0efa8880cca2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/types.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/types.ts @@ -6,5 +6,5 @@ */ export * from '../../../common/types/app_search'; -export { Role, RoleTypes, AbilityTypes, ASRoleMapping, AdvanceRoleType } from './utils/role'; -export { Engine } from './components/engine/types'; +export type { Role, RoleTypes, AbilityTypes, ASRoleMapping, AdvanceRoleType } from './utils/role'; +export type { Engine } from './components/engine/types'; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/flash_messages/index.ts b/x-pack/plugins/enterprise_search/public/applications/shared/flash_messages/index.ts index 38a5d6e8b0b3..097d38e0691c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/flash_messages/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/flash_messages/index.ts @@ -7,7 +7,7 @@ export { FlashMessages, Toasts } from './flash_messages'; export { FlashMessagesLogic, mountFlashMessagesLogic } from './flash_messages_logic'; -export { IFlashMessage } from './types'; +export type { IFlashMessage } from './types'; export { flashAPIErrors } from './handle_api_errors'; export { setSuccessMessage, diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/index.ts b/x-pack/plugins/enterprise_search/public/applications/shared/layout/index.ts index 41f8869ad5f6..79919e925c62 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { EnterpriseSearchPageTemplate, PageTemplateProps } from './page_template'; +export type { PageTemplateProps } from './page_template'; +export { EnterpriseSearchPageTemplate } from './page_template'; export { generateNavLink } from './nav_link_helpers'; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/react_router_helpers/index.ts b/x-pack/plugins/enterprise_search/public/applications/shared/react_router_helpers/index.ts index fe76c13c2b70..a05792d5fb54 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/react_router_helpers/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/react_router_helpers/index.ts @@ -6,8 +6,10 @@ */ export { letBrowserHandleEvent } from './link_events'; -export { createHref, CreateHrefOptions } from './create_href'; -export { generateReactRouterProps, ReactRouterProps } from './generate_react_router_props'; +export type { CreateHrefOptions } from './create_href'; +export { createHref } from './create_href'; +export type { ReactRouterProps } from './generate_react_router_props'; +export { generateReactRouterProps } from './generate_react_router_props'; export { EuiLinkTo, EuiButtonTo, diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_row/index.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_row/index.ts index 9bc16553b1a0..7b0ba4206cff 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_row/index.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/source_row/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { SourceRow, ISourceRow } from './source_row'; +export type { ISourceRow } from './source_row'; +export { SourceRow } from './source_row'; diff --git a/x-pack/plugins/event_log/server/es/index.ts b/x-pack/plugins/event_log/server/es/index.ts index 2631df882cc0..a5bc5dce7f25 100644 --- a/x-pack/plugins/event_log/server/es/index.ts +++ b/x-pack/plugins/event_log/server/es/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { EsContext, createEsContext } from './context'; +export type { EsContext } from './context'; +export { createEsContext } from './context'; diff --git a/x-pack/plugins/event_log/server/index.ts b/x-pack/plugins/event_log/server/index.ts index 14c121664d4a..877c39a02edc 100644 --- a/x-pack/plugins/event_log/server/index.ts +++ b/x-pack/plugins/event_log/server/index.ts @@ -9,7 +9,7 @@ import { PluginInitializerContext, PluginConfigDescriptor } from 'src/core/serve import { ConfigSchema, IEventLogConfig } from './types'; import { Plugin } from './plugin'; -export { +export type { IEventLogService, IEventLogger, IEventLogClientService, @@ -17,8 +17,8 @@ export { IValidatedEvent, IEventLogClient, QueryEventsBySavedObjectResult, - SAVED_OBJECT_REL_PRIMARY, } from './types'; +export { SAVED_OBJECT_REL_PRIMARY } from './types'; export { ClusterClientAdapter } from './es/cluster_client_adapter'; diff --git a/x-pack/plugins/event_log/server/types.ts b/x-pack/plugins/event_log/server/types.ts index 6ffde7fd6dbe..0cc2e7a14514 100644 --- a/x-pack/plugins/event_log/server/types.ts +++ b/x-pack/plugins/event_log/server/types.ts @@ -8,11 +8,12 @@ import { schema, TypeOf } from '@kbn/config-schema'; import type { IRouter, KibanaRequest, RequestHandlerContext } from 'src/core/server'; -export { IEvent, IValidatedEvent, EventSchema, ECS_VERSION } from '../generated/schemas'; +export type { IEvent, IValidatedEvent } from '../generated/schemas'; +export { EventSchema, ECS_VERSION } from '../generated/schemas'; import { IEvent } from '../generated/schemas'; import { FindOptionsType } from './event_log_client'; import { QueryEventsBySavedObjectResult } from './es/cluster_client_adapter'; -export { QueryEventsBySavedObjectResult } from './es/cluster_client_adapter'; +export type { QueryEventsBySavedObjectResult } from './es/cluster_client_adapter'; import { SavedObjectProvider } from './saved_object_provider_registry'; export const SAVED_OBJECT_REL_PRIMARY = 'primary'; diff --git a/x-pack/plugins/features/common/index.ts b/x-pack/plugins/features/common/index.ts index 450b474744fe..9db2a1073cd0 100644 --- a/x-pack/plugins/features/common/index.ts +++ b/x-pack/plugins/features/common/index.ts @@ -5,14 +5,16 @@ * 2.0. */ -export { FeatureElasticsearchPrivileges } from './feature_elasticsearch_privileges'; -export { FeatureKibanaPrivileges } from './feature_kibana_privileges'; -export { ElasticsearchFeature, ElasticsearchFeatureConfig } from './elasticsearch_feature'; -export { KibanaFeature, KibanaFeatureConfig } from './kibana_feature'; -export { - SubFeature, +export type { FeatureElasticsearchPrivileges } from './feature_elasticsearch_privileges'; +export type { FeatureKibanaPrivileges } from './feature_kibana_privileges'; +export type { ElasticsearchFeatureConfig } from './elasticsearch_feature'; +export { ElasticsearchFeature } from './elasticsearch_feature'; +export type { KibanaFeatureConfig } from './kibana_feature'; +export { KibanaFeature } from './kibana_feature'; +export type { SubFeatureConfig, SubFeaturePrivilegeConfig, SubFeaturePrivilegeGroupConfig, SubFeaturePrivilegeGroupType, } from './sub_feature'; +export { SubFeature } from './sub_feature'; diff --git a/x-pack/plugins/features/public/index.ts b/x-pack/plugins/features/public/index.ts index d1a828f51029..2895d83ed114 100644 --- a/x-pack/plugins/features/public/index.ts +++ b/x-pack/plugins/features/public/index.ts @@ -8,15 +8,15 @@ import { PluginInitializer } from 'src/core/public'; import { FeaturesPlugin, FeaturesPluginSetup, FeaturesPluginStart } from './plugin'; -export { - KibanaFeature, +export type { KibanaFeatureConfig, FeatureKibanaPrivileges, SubFeatureConfig, SubFeaturePrivilegeConfig, } from '../common'; +export { KibanaFeature } from '../common'; -export { FeaturesPluginSetup, FeaturesPluginStart } from './plugin'; +export type { FeaturesPluginSetup, FeaturesPluginStart } from './plugin'; export const plugin: PluginInitializer = () => new FeaturesPlugin(); diff --git a/x-pack/plugins/features/server/index.ts b/x-pack/plugins/features/server/index.ts index 0890274fed95..934fcd9d556f 100644 --- a/x-pack/plugins/features/server/index.ts +++ b/x-pack/plugins/features/server/index.ts @@ -14,15 +14,14 @@ import { FeaturesPlugin } from './plugin'; // run-time contracts. export { uiCapabilitiesRegex } from './feature_schema'; -export { - KibanaFeature, +export type { KibanaFeatureConfig, FeatureKibanaPrivileges, - ElasticsearchFeature, ElasticsearchFeatureConfig, FeatureElasticsearchPrivileges, } from '../common'; -export { PluginSetupContract, PluginStartContract } from './plugin'; +export { KibanaFeature, ElasticsearchFeature } from '../common'; +export type { PluginSetupContract, PluginStartContract } from './plugin'; export const plugin = (initializerContext: PluginInitializerContext) => new FeaturesPlugin(initializerContext); diff --git a/x-pack/plugins/file_upload/public/components/geojson_upload_form/index.ts b/x-pack/plugins/file_upload/public/components/geojson_upload_form/index.ts index 6168835a3a14..837c8a0f0269 100644 --- a/x-pack/plugins/file_upload/public/components/geojson_upload_form/index.ts +++ b/x-pack/plugins/file_upload/public/components/geojson_upload_form/index.ts @@ -6,4 +6,4 @@ */ export { GeoJsonUploadForm } from './geojson_upload_form'; -export { OnFileSelectParameters } from './geojson_file_picker'; +export type { OnFileSelectParameters } from './geojson_file_picker'; diff --git a/x-pack/plugins/file_upload/public/importer/geojson_importer/index.ts b/x-pack/plugins/file_upload/public/importer/geojson_importer/index.ts index b5f6845e2832..7d9d8e144fd2 100644 --- a/x-pack/plugins/file_upload/public/importer/geojson_importer/index.ts +++ b/x-pack/plugins/file_upload/public/importer/geojson_importer/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { GeoJsonImporter, GeoJsonPreview, GEOJSON_FILE_TYPES } from './geojson_importer'; +export type { GeoJsonPreview } from './geojson_importer'; +export { GeoJsonImporter, GEOJSON_FILE_TYPES } from './geojson_importer'; diff --git a/x-pack/plugins/file_upload/public/index.ts b/x-pack/plugins/file_upload/public/index.ts index b9e289ef00ee..00b39dca1180 100644 --- a/x-pack/plugins/file_upload/public/index.ts +++ b/x-pack/plugins/file_upload/public/index.ts @@ -16,7 +16,7 @@ export function plugin() { export * from './importer/types'; -export { Props as IndexNameFormProps } from './components/geojson_upload_form/index_name_form'; +export type { Props as IndexNameFormProps } from './components/geojson_upload_form/index_name_form'; -export { FileUploadPluginStart } from './plugin'; -export { FileUploadComponentProps, FileUploadGeoResults } from './lazy_load_bundle'; +export type { FileUploadPluginStart } from './plugin'; +export type { FileUploadComponentProps, FileUploadGeoResults } from './lazy_load_bundle'; diff --git a/x-pack/plugins/fleet/common/services/index.ts b/x-pack/plugins/fleet/common/services/index.ts index a6f4cd319b97..ba3fb4475364 100644 --- a/x-pack/plugins/fleet/common/services/index.ts +++ b/x-pack/plugins/fleet/common/services/index.ts @@ -21,10 +21,12 @@ export { isDiffPathProtocol } from './is_diff_path_protocol'; export { LicenseService } from './license'; export { isAgentUpgradeable } from './is_agent_upgradeable'; export { doesPackageHaveIntegrations } from './packages_with_integrations'; -export { +export type { PackagePolicyValidationResults, PackagePolicyConfigValidationResults, PackagePolicyInputValidationResults, +} from './validate_package_policy'; +export { validatePackagePolicy, validatePackagePolicyConfig, validationHasErrors, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/index.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/index.ts index 0e1953316fd5..38ef2a60e41d 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/index.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/index.ts @@ -7,10 +7,12 @@ export { isAdvancedVar } from './is_advanced_var'; export { hasInvalidButRequiredVar } from './has_invalid_but_required_var'; -export { +export type { PackagePolicyValidationResults, PackagePolicyConfigValidationResults, PackagePolicyInputValidationResults, +} from '../../../../services'; +export { validatePackagePolicy, validatePackagePolicyConfig, validationHasErrors, diff --git a/x-pack/plugins/fleet/public/components/index.ts b/x-pack/plugins/fleet/public/components/index.ts index 3252315312d0..9015071450bf 100644 --- a/x-pack/plugins/fleet/public/components/index.ts +++ b/x-pack/plugins/fleet/public/components/index.ts @@ -13,7 +13,8 @@ export { LinkedAgentCount } from './linked_agent_count'; export { ExtensionWrapper } from './extension_wrapper'; export { AlphaMessaging } from './alpha_messaging'; export { AlphaFlyout } from './alpha_flyout'; -export { HeaderProps, Header } from './header'; +export type { HeaderProps } from './header'; +export { Header } from './header'; export { NewEnrollmentTokenModal } from './new_enrollment_key_modal'; export { AgentPolicyPackageBadges } from './agent_policy_package_badges'; export { DangerEuiContextMenuItem } from './danger_eui_context_menu_item'; diff --git a/x-pack/plugins/fleet/public/hooks/index.ts b/x-pack/plugins/fleet/public/hooks/index.ts index c41dd1ad42a7..16454a266c3c 100644 --- a/x-pack/plugins/fleet/public/hooks/index.ts +++ b/x-pack/plugins/fleet/public/hooks/index.ts @@ -12,8 +12,10 @@ export { useKibanaVersion, KibanaVersionContext } from './use_kibana_version'; export { licenseService, useLicense } from './use_license'; export { useLink } from './use_link'; export { useKibanaLink, getHrefToObjectInKibanaApp } from './use_kibana_link'; -export { usePackageIconType, UsePackageIconType } from './use_package_icon_type'; -export { usePagination, Pagination, PAGE_SIZE_OPTIONS } from './use_pagination'; +export type { UsePackageIconType } from './use_package_icon_type'; +export { usePackageIconType } from './use_package_icon_type'; +export type { Pagination } from './use_pagination'; +export { usePagination, PAGE_SIZE_OPTIONS } from './use_pagination'; export { useUrlPagination } from './use_url_pagination'; export { useSorting } from './use_sorting'; export { useDebounce } from './use_debounce'; diff --git a/x-pack/plugins/fleet/public/index.ts b/x-pack/plugins/fleet/public/index.ts index b54d00eafdaa..ee4fe526fb0e 100644 --- a/x-pack/plugins/fleet/public/index.ts +++ b/x-pack/plugins/fleet/public/index.ts @@ -12,7 +12,7 @@ import type { PluginInitializerContext } from 'src/core/public'; import { FleetPlugin } from './plugin'; -export { FleetSetup, FleetStart } from './plugin'; +export type { FleetSetup, FleetStart } from './plugin'; export const plugin = (initializerContext: PluginInitializerContext) => { return new FleetPlugin(initializerContext); @@ -24,7 +24,5 @@ export * from './types/ui_extensions'; export { pagePathGetters } from './constants'; export { pkgKeyFromPackageInfo } from './services'; -export { - CustomAssetsAccordion, - CustomAssetsAccordionProps, -} from './components/custom_assets_accordion'; +export type { CustomAssetsAccordionProps } from './components/custom_assets_accordion'; +export { CustomAssetsAccordion } from './components/custom_assets_accordion'; diff --git a/x-pack/plugins/fleet/public/layouts/index.ts b/x-pack/plugins/fleet/public/layouts/index.ts index e6e366654a86..62e3c5b889ca 100644 --- a/x-pack/plugins/fleet/public/layouts/index.ts +++ b/x-pack/plugins/fleet/public/layouts/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { WithHeaderLayout, WithHeaderLayoutProps } from './with_header'; +export type { WithHeaderLayoutProps } from './with_header'; +export { WithHeaderLayout } from './with_header'; export { WithoutHeaderLayout } from './without_header'; diff --git a/x-pack/plugins/fleet/public/plugin.ts b/x-pack/plugins/fleet/public/plugin.ts index b0e4e56aa344..039c1da9b934 100644 --- a/x-pack/plugins/fleet/public/plugin.ts +++ b/x-pack/plugins/fleet/public/plugin.ts @@ -52,7 +52,7 @@ import { createExtensionRegistrationCallback } from './services/ui_extensions'; import type { UIExtensionRegistrationCallback, UIExtensionsStorage } from './types'; import { LazyCustomLogsAssetsExtension } from './lazy_custom_logs_assets_extension'; -export { FleetConfigType } from '../common/types'; +export type { FleetConfigType } from '../common/types'; import { setCustomIntegrations } from './services/custom_integrations'; diff --git a/x-pack/plugins/fleet/public/services/index.ts b/x-pack/plugins/fleet/public/services/index.ts index fbd3bddde744..10dfe6b59d6b 100644 --- a/x-pack/plugins/fleet/public/services/index.ts +++ b/x-pack/plugins/fleet/public/services/index.ts @@ -7,6 +7,11 @@ export { getFlattenedObject } from '@kbn/std'; +export type { + PackagePolicyValidationResults, + PackagePolicyConfigValidationResults, + PackagePolicyInputValidationResults, +} from '../../common'; export { AgentStatusKueryHelper, agentPolicyRouteService, @@ -30,9 +35,6 @@ export { LicenseService, isAgentUpgradeable, doesPackageHaveIntegrations, - PackagePolicyValidationResults, - PackagePolicyConfigValidationResults, - PackagePolicyInputValidationResults, validatePackagePolicy, validatePackagePolicyConfig, validationHasErrors, diff --git a/x-pack/plugins/fleet/public/types/index.ts b/x-pack/plugins/fleet/public/types/index.ts index 3ff0a760b588..d61223f0cebc 100644 --- a/x-pack/plugins/fleet/public/types/index.ts +++ b/x-pack/plugins/fleet/public/types/index.ts @@ -5,10 +5,7 @@ * 2.0. */ -export { - // utility function - entries, - // Object types +export type { Agent, AgentMetadata, AgentPolicy, @@ -28,9 +25,7 @@ export { Output, DataStream, Settings, - // API schema - misc setup, status GetFleetStatusResponse, - // API schemas - Agent policy GetAgentPoliciesRequest, GetAgentPoliciesResponse, GetAgentPoliciesResponseItem, @@ -44,7 +39,6 @@ export { CopyAgentPolicyResponse, DeleteAgentPolicyRequest, DeleteAgentPolicyResponse, - // API schemas - Package policy CreatePackagePolicyRequest, CreatePackagePolicyResponse, UpdatePackagePolicyRequest, @@ -53,9 +47,7 @@ export { DryRunPackagePolicy, UpgradePackagePolicyResponse, UpgradePackagePolicyDryRunResponse, - // API schemas - Data streams GetDataStreamsResponse, - // API schemas - Agents GetAgentsResponse, GetAgentsRequest, GetOneAgentResponse, @@ -75,24 +67,19 @@ export { PostBulkAgentReassignResponse, PostNewAgentActionResponse, PostNewAgentActionRequest, - // API schemas - Enrollment API Keys GetEnrollmentAPIKeysResponse, GetEnrollmentAPIKeysRequest, GetOneEnrollmentAPIKeyResponse, PostEnrollmentAPIKeyRequest, PostEnrollmentAPIKeyResponse, - // API schemas - Outputs GetOutputsResponse, PutOutputRequest, PutOutputResponse, - // API schemas - Settings GetSettingsResponse, PutSettingsRequest, PutSettingsResponse, - // API schemas - app CheckPermissionsResponse, GenerateServiceTokenResponse, - // EPM types AssetReference, AssetsGroupedByServiceByType, AssetType, @@ -100,8 +87,6 @@ export { CategoryId, CategorySummaryItem, CategorySummaryList, - ElasticsearchAssetType, - KibanaAssetType, PackageInfo, RegistryVarsEntry, RegistryInput, @@ -123,7 +108,6 @@ export { InstallPackageResponse, DeletePackageResponse, DetailViewPanelName, - InstallStatus, InstallationStatus, Installable, RegistryRelease, @@ -131,6 +115,7 @@ export { UpdatePackageRequest, UpdatePackageResponse, } from '../../common'; +export { entries, ElasticsearchAssetType, KibanaAssetType, InstallStatus } from '../../common'; export * from './intra_app_route_state'; export * from './ui_extensions'; diff --git a/x-pack/plugins/fleet/server/index.ts b/x-pack/plugins/fleet/server/index.ts index cdc0dfddc01e..2e8dcc1162d6 100644 --- a/x-pack/plugins/fleet/server/index.ts +++ b/x-pack/plugins/fleet/server/index.ts @@ -18,18 +18,18 @@ import { import { FleetPlugin } from './plugin'; export { default as apm } from 'elastic-apm-node'; -export { +export type { AgentService, ESIndexPatternService, - getRegistryUrl, PackageService, AgentPolicyServiceInterface, ArtifactsClientInterface, Artifact, ListArtifactsProps, } from './services'; +export { getRegistryUrl } from './services'; -export { FleetSetupContract, FleetSetupDeps, FleetStartContract } from './plugin'; +export type { FleetSetupContract, FleetSetupDeps, FleetStartContract } from './plugin'; export type { ExternalCallback, PutPackagePolicyUpdateCallback, @@ -129,7 +129,7 @@ export const config: PluginConfigDescriptor = { export type FleetConfigType = TypeOf; -export { PackagePolicyServiceInterface } from './services/package_policy'; +export type { PackagePolicyServiceInterface } from './services/package_policy'; export { relativeDownloadUrlFromArtifact } from './services/artifacts/mappings'; diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.ts index 8d3c1fbe0daa..b6a1850fed5b 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.ts @@ -30,7 +30,8 @@ import { normalizeKuery } from '../../saved_object'; import { createInstallableFrom, isUnremovablePackage } from './index'; -export { getFile, SearchParams } from '../registry'; +export type { SearchParams } from '../registry'; +export { getFile } from '../registry'; function nameAsTitle(name: string) { return name.charAt(0).toUpperCase() + name.substr(1).toLowerCase(); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/index.ts b/x-pack/plugins/fleet/server/services/epm/packages/index.ts index 58e7c9e8928d..a6970a8d19db 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/index.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/index.ts @@ -12,6 +12,7 @@ import { KibanaAssetType } from '../../../types'; import type { AssetType, Installable, Installation } from '../../../types'; export { bulkInstallPackages, isBulkInstallError } from './bulk_install_packages'; +export type { SearchParams } from './get'; export { getCategories, getFile, @@ -21,16 +22,10 @@ export { getPackageInfo, getPackages, getLimitedPackages, - SearchParams, } from './get'; -export { - BulkInstallResponse, - IBulkInstallPackageError, - handleInstallPackageFailure, - installPackage, - ensureInstalledPackage, -} from './install'; +export type { BulkInstallResponse, IBulkInstallPackageError } from './install'; +export { handleInstallPackageFailure, installPackage, ensureInstalledPackage } from './install'; export { removeInstallation } from './remove'; export function isUnremovablePackage(value: string): boolean { diff --git a/x-pack/plugins/fleet/server/types/index.tsx b/x-pack/plugins/fleet/server/types/index.tsx index 5bdd95ef0b87..174aac03d6a3 100644 --- a/x-pack/plugins/fleet/server/types/index.tsx +++ b/x-pack/plugins/fleet/server/types/index.tsx @@ -5,8 +5,7 @@ * 2.0. */ -export { - // Object types +export type { Agent, AgentMetadata, AgentSOAttributes, @@ -51,13 +50,10 @@ export { AssetReference, EsAssetReference, KibanaAssetReference, - ElasticsearchAssetType, RegistryPackage, InstallablePackage, AssetType, Installable, - KibanaAssetType, - KibanaSavedObjectType, AssetParts, AssetsGroupedByServiceByType, CategoryId, @@ -74,13 +70,17 @@ export { InstallResult, GetCategoriesRequest, DataType, - dataTypes, - // Fleet Server types FleetServerEnrollmentAPIKey, FleetServerAgent, FleetServerAgentAction, FleetServerPolicy, } from '../../common'; +export { + ElasticsearchAssetType, + KibanaAssetType, + KibanaSavedObjectType, + dataTypes, +} from '../../common'; export type AgentPolicyUpdateHandler = ( action: 'created' | 'updated' | 'deleted', @@ -96,4 +96,4 @@ export interface BulkActionResult { export * from './models'; export * from './rest_spec'; export * from './extensions'; -export { FleetRequestHandler, FleetRequestHandlerContext } from './request_context'; +export type { FleetRequestHandler, FleetRequestHandlerContext } from './request_context'; diff --git a/x-pack/plugins/global_search/public/index.ts b/x-pack/plugins/global_search/public/index.ts index adb392cc61a5..55a16407eb60 100644 --- a/x-pack/plugins/global_search/public/index.ts +++ b/x-pack/plugins/global_search/public/index.ts @@ -20,7 +20,7 @@ export const plugin: PluginInitializer< GlobalSearchPluginStartDeps > = (context) => new GlobalSearchPlugin(context); -export { +export type { GlobalSearchBatchedResults, GlobalSearchProviderFindOptions, GlobalSearchProviderResult, @@ -29,9 +29,9 @@ export { GlobalSearchFindParams, GlobalSearchProviderFindParams, } from '../common/types'; -export { +export type { GlobalSearchPluginSetup, GlobalSearchPluginStart, GlobalSearchResultProvider, } from './types'; -export { GlobalSearchFindOptions } from './services/types'; +export type { GlobalSearchFindOptions } from './services/types'; diff --git a/x-pack/plugins/global_search/public/services/index.ts b/x-pack/plugins/global_search/public/services/index.ts index 0405a6d8899c..b178d3e76f84 100644 --- a/x-pack/plugins/global_search/public/services/index.ts +++ b/x-pack/plugins/global_search/public/services/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { SearchService, SearchServiceSetup, SearchServiceStart } from './search_service'; -export { GlobalSearchFindOptions } from './types'; +export type { SearchServiceSetup, SearchServiceStart } from './search_service'; +export { SearchService } from './search_service'; +export type { GlobalSearchFindOptions } from './types'; diff --git a/x-pack/plugins/global_search/server/index.ts b/x-pack/plugins/global_search/server/index.ts index 1da9a10fad84..d98e10f40430 100644 --- a/x-pack/plugins/global_search/server/index.ts +++ b/x-pack/plugins/global_search/server/index.ts @@ -22,14 +22,14 @@ export const plugin: PluginInitializer< export { config } from './config'; -export { +export type { GlobalSearchBatchedResults, GlobalSearchProviderFindOptions, GlobalSearchProviderResult, GlobalSearchProviderResultUrl, GlobalSearchResult, } from '../common/types'; -export { +export type { GlobalSearchFindOptions, GlobalSearchProviderContext, GlobalSearchPluginStart, diff --git a/x-pack/plugins/global_search/server/services/index.ts b/x-pack/plugins/global_search/server/services/index.ts index 32ae3805038d..ac5b326dd5c0 100644 --- a/x-pack/plugins/global_search/server/services/index.ts +++ b/x-pack/plugins/global_search/server/services/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { SearchService, SearchServiceSetup, SearchServiceStart } from './search_service'; +export type { SearchServiceSetup, SearchServiceStart } from './search_service'; +export { SearchService } from './search_service'; diff --git a/x-pack/plugins/global_search_bar/public/search_syntax/index.ts b/x-pack/plugins/global_search_bar/public/search_syntax/index.ts index 87d370d0c905..7bf8ee39df14 100644 --- a/x-pack/plugins/global_search_bar/public/search_syntax/index.ts +++ b/x-pack/plugins/global_search_bar/public/search_syntax/index.ts @@ -6,4 +6,4 @@ */ export { parseSearchParams } from './parse_search_params'; -export { ParsedSearchParams, FilterValues, FilterValueType } from './types'; +export type { ParsedSearchParams, FilterValues, FilterValueType } from './types'; diff --git a/x-pack/plugins/global_search_bar/public/suggestions/index.ts b/x-pack/plugins/global_search_bar/public/suggestions/index.ts index 0c19601f21eb..32fcdea79550 100644 --- a/x-pack/plugins/global_search_bar/public/suggestions/index.ts +++ b/x-pack/plugins/global_search_bar/public/suggestions/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { getSuggestions, SearchSuggestion } from './get_suggestions'; +export type { SearchSuggestion } from './get_suggestions'; +export { getSuggestions } from './get_suggestions'; diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/index.ts b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/index.ts index f31fedfac668..0439e9d5ec13 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/index.ts +++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/index.ts @@ -19,10 +19,7 @@ export { ConfigurationProvider, useConfiguration } from './configuration_context export { FormErrorsProvider, useFormErrorsContext } from './form_errors_context'; -export { - PhaseTimingsProvider, - usePhaseTimings, - PhaseTimingConfiguration, -} from './phase_timings_context'; +export type { PhaseTimingConfiguration } from './phase_timings_context'; +export { PhaseTimingsProvider, usePhaseTimings } from './phase_timings_context'; export { useGlobalFields, globalFields } from './global_fields_context'; diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/lib/index.ts b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/lib/index.ts index 607c62cd3ce8..5bc887c5a3c7 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/lib/index.ts +++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/lib/index.ts @@ -5,13 +5,15 @@ * 2.0. */ -export { - calculateRelativeFromAbsoluteMilliseconds, - formDataToAbsoluteTimings, - getPhaseMinAgeInMilliseconds, +export type { AbsoluteTimings, PhaseAgeInMilliseconds, RelativePhaseTimingInMs, } from './absolute_timing_to_relative_timing'; +export { + calculateRelativeFromAbsoluteMilliseconds, + formDataToAbsoluteTimings, + getPhaseMinAgeInMilliseconds, +} from './absolute_timing_to_relative_timing'; export { getDefaultRepository } from './get_default_repository'; diff --git a/x-pack/plugins/index_lifecycle_management/public/index.ts b/x-pack/plugins/index_lifecycle_management/public/index.ts index cbd23a14a611..2b8573902781 100644 --- a/x-pack/plugins/index_lifecycle_management/public/index.ts +++ b/x-pack/plugins/index_lifecycle_management/public/index.ts @@ -14,4 +14,5 @@ export const plugin = (initializerContext: PluginInitializerContext) => { return new IndexLifecycleManagementPlugin(initializerContext); }; -export { ILM_LOCATOR_ID, IlmLocatorParams } from './locator'; +export type { IlmLocatorParams } from './locator'; +export { ILM_LOCATOR_ID } from './locator'; diff --git a/x-pack/plugins/index_lifecycle_management/public/shared_imports.ts b/x-pack/plugins/index_lifecycle_management/public/shared_imports.ts index e191c4bd799a..dab299c476ee 100644 --- a/x-pack/plugins/index_lifecycle_management/public/shared_imports.ts +++ b/x-pack/plugins/index_lifecycle_management/public/shared_imports.ts @@ -8,10 +8,7 @@ import { AppServicesContext } from './types'; import { useKibana as _useKibana } from '../../../../src/plugins/kibana_react/public'; -export { - useForm, - useFormData, - Form, +export type { FormHook, FieldHook, FormData, @@ -19,11 +16,16 @@ export { FieldConfig, OnFormUpdateArg, ValidationFunc, - getFieldValidityAndErrorMessage, - useFormContext, FormSchema, ValidationConfig, ValidationError, +} from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; +export { + useForm, + useFormData, + Form, + getFieldValidityAndErrorMessage, + useFormContext, UseMultiFields, } from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; diff --git a/x-pack/plugins/index_lifecycle_management/server/shared_imports.ts b/x-pack/plugins/index_lifecycle_management/server/shared_imports.ts index 5c91a0a57ce5..4598814d63c0 100644 --- a/x-pack/plugins/index_lifecycle_management/server/shared_imports.ts +++ b/x-pack/plugins/index_lifecycle_management/server/shared_imports.ts @@ -6,4 +6,4 @@ */ export { handleEsError } from '../../../../src/plugins/es_ui_shared/server'; -export { ILicense, LicenseType } from '../../licensing/common/types'; +export type { ILicense, LicenseType } from '../../licensing/common/types'; diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts b/x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts index 997f234cf309..79df6e8e9f20 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts @@ -7,7 +7,8 @@ import './mocks'; -export { nextTick, getRandomString, findTestSubject, TestBed } from '@kbn/test/jest'; +export type { TestBed } from '@kbn/test/jest'; +export { nextTick, getRandomString, findTestSubject } from '@kbn/test/jest'; export { setupEnvironment, @@ -16,4 +17,4 @@ export { kibanaVersion, } from './setup_environment'; -export { TestSubjects } from './test_subjects'; +export type { TestSubjects } from './test_subjects'; diff --git a/x-pack/plugins/index_management/common/types/index.ts b/x-pack/plugins/index_management/common/types/index.ts index 9908e9598412..0cc514b47024 100644 --- a/x-pack/plugins/index_management/common/types/index.ts +++ b/x-pack/plugins/index_management/common/types/index.ts @@ -13,6 +13,6 @@ export * from './mappings'; export * from './templates'; -export { DataStreamFromEs, Health, DataStream, DataStreamIndex } from './data_streams'; +export type { DataStreamFromEs, Health, DataStream, DataStreamIndex } from './data_streams'; export * from './component_templates'; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_details/index.ts b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_details/index.ts index 2545c47e47c2..fd65eb040160 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_details/index.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_details/index.ts @@ -5,8 +5,8 @@ * 2.0. */ +export type { Props as ComponentTemplateDetailsProps } from './component_template_details'; export { ComponentTemplateDetailsFlyoutContent, defaultFlyoutProps, - Props as ComponentTemplateDetailsProps, } from './component_template_details'; diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/shared_imports.ts b/x-pack/plugins/index_management/public/application/components/component_templates/shared_imports.ts index 15528f5b4e8e..2f5b98e59bb2 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/shared_imports.ts +++ b/x-pack/plugins/index_management/public/application/components/component_templates/shared_imports.ts @@ -5,11 +5,14 @@ * 2.0. */ -export { +export type { UseRequestConfig, UseRequestResponse, SendRequestConfig, SendRequestResponse, + Error, +} from '../../../../../../../src/plugins/es_ui_shared/public'; +export { sendRequest, useRequest, WithPrivileges, @@ -18,7 +21,6 @@ export { SectionLoading, PageLoading, PageError, - Error, useAuthorizationContext, NotAuthorizedSection, Forms, @@ -32,11 +34,13 @@ export { fieldFormatters, } from '../../../../../../../src/plugins/es_ui_shared/static/forms/helpers'; -export { +export type { FormSchema, + FieldConfig, +} from '../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; +export { FIELD_TYPES, VALIDATION_TYPES, - FieldConfig, useForm, Form, getUseField, @@ -50,17 +54,17 @@ export { export { isJSON } from '../../../../../../../src/plugins/es_ui_shared/static/validators/string'; +export type { CommonWizardSteps } from '../shared'; export { TabMappings, TabSettings, TabAliases, - CommonWizardSteps, StepSettingsContainer, StepMappingsContainer, StepAliasesContainer, } from '../shared'; -export { +export type { ComponentTemplateSerialized, ComponentTemplateDeserialized, ComponentTemplateListItem, diff --git a/x-pack/plugins/index_management/public/application/components/index.ts b/x-pack/plugins/index_management/public/application/components/index.ts index eeba6e16b543..fe3e41c34a87 100644 --- a/x-pack/plugins/index_management/public/application/components/index.ts +++ b/x-pack/plugins/index_management/public/application/components/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -export { SectionError, Error } from './section_error'; +export type { Error } from './section_error'; +export { SectionError } from './section_error'; export { NoMatch } from './no_match'; export { TemplateDeleteModal } from './template_delete_modal'; export { TemplateForm } from './template_form'; diff --git a/x-pack/plugins/index_management/public/application/components/index_templates/index.ts b/x-pack/plugins/index_management/public/application/components/index_templates/index.ts index d460175543ac..f51fe3f5d6fe 100644 --- a/x-pack/plugins/index_management/public/application/components/index_templates/index.ts +++ b/x-pack/plugins/index_management/public/application/components/index_templates/index.ts @@ -5,12 +5,11 @@ * 2.0. */ +export type { SimulateTemplateProps, SimulateTemplateFilters } from './simulate_template'; export { SimulateTemplateFlyoutContent, simulateTemplateFlyoutProps, - SimulateTemplateProps, SimulateTemplate, - SimulateTemplateFilters, } from './simulate_template'; export { LegacyIndexTemplatesDeprecation } from './legacy_index_template_deprecation'; diff --git a/x-pack/plugins/index_management/public/application/components/index_templates/simulate_template/index.ts b/x-pack/plugins/index_management/public/application/components/index_templates/simulate_template/index.ts index 91273dc82f90..2837eb8f1f40 100644 --- a/x-pack/plugins/index_management/public/application/components/index_templates/simulate_template/index.ts +++ b/x-pack/plugins/index_management/public/application/components/index_templates/simulate_template/index.ts @@ -5,10 +5,11 @@ * 2.0. */ +export type { Props as SimulateTemplateProps } from './simulate_template_flyout'; export { SimulateTemplateFlyoutContent, defaultFlyoutProps as simulateTemplateFlyoutProps, - Props as SimulateTemplateProps, } from './simulate_template_flyout'; -export { SimulateTemplate, Filters as SimulateTemplateFilters } from './simulate_template'; +export type { Filters as SimulateTemplateFilters } from './simulate_template'; +export { SimulateTemplate } from './simulate_template'; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/index.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/index.ts index fbe24557ae6a..d43649275665 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/index.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/__jest__/client_integration/helpers/index.ts @@ -12,11 +12,12 @@ import { getMappingsEditorDataFactory, } from './mappings_editor.helpers'; -export { nextTick, getRandomString, findTestSubject, TestBed } from '@kbn/test/jest'; +export type { TestBed } from '@kbn/test/jest'; +export { nextTick, getRandomString, findTestSubject } from '@kbn/test/jest'; export { kibanaVersion } from './setup_environment'; export const componentHelpers = { mappingsEditor: { setup: mappingsEditorSetup, getMappingsEditorDataFactory }, }; -export { MappingsEditorTestBed, DomFields }; +export type { MappingsEditorTestBed, DomFields }; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/edit_field/index.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/edit_field/index.ts index a171959daf2c..4b3e2657ba6a 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/edit_field/index.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/edit_field/index.ts @@ -5,11 +5,8 @@ * 2.0. */ -export { - EditFieldContainer, - defaultFlyoutProps, - Props as EditFieldContainerProps, -} from './edit_field_container'; +export type { Props as EditFieldContainerProps } from './edit_field_container'; +export { EditFieldContainer, defaultFlyoutProps } from './edit_field_container'; export * from './basic_parameters_section'; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/index.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/index.ts index 9692e5d6c22b..2d284297041e 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/index.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/index.ts @@ -13,4 +13,4 @@ export { LoadMappingsFromJsonButton, LoadMappingsProvider } from './components/l export { MappingsEditorProvider } from './mappings_editor_context'; -export { IndexSettings, OnUpdateHandler } from './types'; +export type { IndexSettings, OnUpdateHandler } from './types'; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts index 4ea8412d4ffe..de9c1985239f 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/shared_imports.ts @@ -5,26 +5,28 @@ * 2.0. */ -export { - FIELD_TYPES, +export type { FieldConfig, FieldHook, - Form, - FormDataProvider, FormHook, FormSchema, - getUseField, OnFormUpdateArg, SerializerFunc, + ArrayItem, + ValidationFunc, + ValidationFuncArg, +} from '../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; +export { + FIELD_TYPES, + Form, + FormDataProvider, + getUseField, UseField, UseArray, - ArrayItem, useForm, useFormContext, UseMultiFields, VALIDATION_TYPES, - ValidationFunc, - ValidationFuncArg, } from '../../../../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; export { @@ -47,20 +49,17 @@ export { fieldValidators, } from '../../../../../../../src/plugins/es_ui_shared/static/forms/helpers'; -export { - JsonEditor, - OnJsonEditorUpdateHandler, - GlobalFlyout, -} from '../../../../../../../src/plugins/es_ui_shared/public'; +export type { OnJsonEditorUpdateHandler } from '../../../../../../../src/plugins/es_ui_shared/public'; +export { JsonEditor, GlobalFlyout } from '../../../../../../../src/plugins/es_ui_shared/public'; export { documentationService } from '../../services/documentation'; -export { +export type { RuntimeField, - RuntimeFieldEditorFlyoutContent, RuntimeFieldEditorFlyoutContentProps, } from '../../../../../runtime_fields/public'; +export { RuntimeFieldEditorFlyoutContent } from '../../../../../runtime_fields/public'; export { createKibanaReactContext } from '../../../../../../../src/plugins/kibana_react/public'; -export { DocLinksStart } from '../../../../../../../src/core/public'; +export type { DocLinksStart } from '../../../../../../../src/core/public'; diff --git a/x-pack/plugins/index_management/public/application/components/shared/components/index.ts b/x-pack/plugins/index_management/public/application/components/shared/components/index.ts index 6011bd6aed4f..3c564c0caf6e 100644 --- a/x-pack/plugins/index_management/public/application/components/shared/components/index.ts +++ b/x-pack/plugins/index_management/public/application/components/shared/components/index.ts @@ -7,11 +7,7 @@ export { TabAliases, TabMappings, TabSettings } from './details_panel'; -export { - StepAliasesContainer, - StepMappingsContainer, - StepSettingsContainer, - CommonWizardSteps, -} from './wizard_steps'; +export type { CommonWizardSteps } from './wizard_steps'; +export { StepAliasesContainer, StepMappingsContainer, StepSettingsContainer } from './wizard_steps'; export { TemplateContentIndicator } from './template_content_indicator'; diff --git a/x-pack/plugins/index_management/public/application/components/shared/components/wizard_steps/index.ts b/x-pack/plugins/index_management/public/application/components/shared/components/wizard_steps/index.ts index 224c753b8230..2197e5140fc9 100644 --- a/x-pack/plugins/index_management/public/application/components/shared/components/wizard_steps/index.ts +++ b/x-pack/plugins/index_management/public/application/components/shared/components/wizard_steps/index.ts @@ -9,4 +9,4 @@ export { StepAliasesContainer } from './step_aliases_container'; export { StepMappingsContainer } from './step_mappings_container'; export { StepSettingsContainer } from './step_settings_container'; -export { CommonWizardSteps } from './types'; +export type { CommonWizardSteps } from './types'; diff --git a/x-pack/plugins/index_management/public/application/components/shared/index.ts b/x-pack/plugins/index_management/public/application/components/shared/index.ts index 96b4131f8282..06899e202ef8 100644 --- a/x-pack/plugins/index_management/public/application/components/shared/index.ts +++ b/x-pack/plugins/index_management/public/application/components/shared/index.ts @@ -5,6 +5,7 @@ * 2.0. */ +export type { CommonWizardSteps } from './components'; export { TabAliases, TabMappings, @@ -12,6 +13,5 @@ export { StepAliasesContainer, StepMappingsContainer, StepSettingsContainer, - CommonWizardSteps, TemplateContentIndicator, } from './components'; diff --git a/x-pack/plugins/index_management/public/application/index.tsx b/x-pack/plugins/index_management/public/application/index.tsx index b7a4bd213514..854826681ada 100644 --- a/x-pack/plugins/index_management/public/application/index.tsx +++ b/x-pack/plugins/index_management/public/application/index.tsx @@ -93,4 +93,5 @@ const useKibana = () => { return useKibanaReactPlugin(); }; -export { AppDependencies, useKibana }; +export type { AppDependencies }; +export { useKibana }; diff --git a/x-pack/plugins/index_management/public/application/sections/home/components/index.ts b/x-pack/plugins/index_management/public/application/sections/home/components/index.ts index df1218f6f068..8cd35ead5d30 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/components/index.ts +++ b/x-pack/plugins/index_management/public/application/sections/home/components/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { FilterListButton, Filters } from './filter_list_button'; +export type { Filters } from './filter_list_button'; +export { FilterListButton } from './filter_list_button'; diff --git a/x-pack/plugins/index_management/public/index.ts b/x-pack/plugins/index_management/public/index.ts index f9ccc788a36c..01635ed2a9b8 100644 --- a/x-pack/plugins/index_management/public/index.ts +++ b/x-pack/plugins/index_management/public/index.ts @@ -14,7 +14,7 @@ export const plugin = (ctx: PluginInitializerContext) => { return new IndexMgmtUIPlugin(ctx); }; -export { IndexManagementPluginSetup } from './types'; +export type { IndexManagementPluginSetup } from './types'; export { getIndexListUri, getTemplateDetailsLink } from './application/services/routing'; diff --git a/x-pack/plugins/index_management/public/services/index.ts b/x-pack/plugins/index_management/public/services/index.ts index fe91e700236c..f32787a427b8 100644 --- a/x-pack/plugins/index_management/public/services/index.ts +++ b/x-pack/plugins/index_management/public/services/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ExtensionsService, ExtensionsSetup } from './extensions_service'; +export type { ExtensionsSetup } from './extensions_service'; +export { ExtensionsService } from './extensions_service'; diff --git a/x-pack/plugins/index_management/public/shared_imports.ts b/x-pack/plugins/index_management/public/shared_imports.ts index 4e1c42079590..7fadcd9e7150 100644 --- a/x-pack/plugins/index_management/public/shared_imports.ts +++ b/x-pack/plugins/index_management/public/shared_imports.ts @@ -7,11 +7,14 @@ export { APP_WRAPPER_CLASS } from '../../../../src/core/public'; -export { +export type { SendRequestConfig, SendRequestResponse, UseRequestConfig, UseRequestResponse, + Error, +} from '../../../../src/plugins/es_ui_shared/public'; +export { sendRequest, useRequest, Forms, @@ -20,16 +23,17 @@ export { attemptToURIDecode, PageLoading, PageError, - Error, SectionLoading, EuiCodeEditor, } from '../../../../src/plugins/es_ui_shared/public'; -export { +export type { FormSchema, + FieldConfig, +} from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; +export { FIELD_TYPES, VALIDATION_TYPES, - FieldConfig, useForm, useFormData, Form, diff --git a/x-pack/plugins/index_management/server/index.ts b/x-pack/plugins/index_management/server/index.ts index 29291116e44f..8eb882d29de2 100644 --- a/x-pack/plugins/index_management/server/index.ts +++ b/x-pack/plugins/index_management/server/index.ts @@ -14,7 +14,7 @@ export { config } from './config'; export const plugin = (context: PluginInitializerContext) => new IndexMgmtServerPlugin(context); /** @public */ -export { Dependencies } from './types'; -export { IndexManagementPluginSetup } from './plugin'; -export { Index, LegacyTemplateSerialized } from '../common'; -export { IndexManagementConfig } from './config'; +export type { Dependencies } from './types'; +export type { IndexManagementPluginSetup } from './plugin'; +export type { Index, LegacyTemplateSerialized } from '../common'; +export type { IndexManagementConfig } from './config'; diff --git a/x-pack/plugins/index_management/server/services/index.ts b/x-pack/plugins/index_management/server/services/index.ts index 576d7c46fa08..bd62f2df80cc 100644 --- a/x-pack/plugins/index_management/server/services/index.ts +++ b/x-pack/plugins/index_management/server/services/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { IndexDataEnricher, Enricher } from './index_data_enricher'; +export type { Enricher } from './index_data_enricher'; +export { IndexDataEnricher } from './index_data_enricher'; diff --git a/x-pack/plugins/infra/common/log_search_result/index.ts b/x-pack/plugins/infra/common/log_search_result/index.ts index d1b2672fbfba..592b23dfc70a 100644 --- a/x-pack/plugins/infra/common/log_search_result/index.ts +++ b/x-pack/plugins/infra/common/log_search_result/index.ts @@ -5,9 +5,9 @@ * 2.0. */ +export type { SearchResult } from './log_search_result'; export { getSearchResultIndexBeforeTime, getSearchResultIndexAfterTime, getSearchResultKey, - SearchResult, } from './log_search_result'; diff --git a/x-pack/plugins/infra/common/log_search_summary/index.ts b/x-pack/plugins/infra/common/log_search_summary/index.ts index feb64dee7d31..32652753f779 100644 --- a/x-pack/plugins/infra/common/log_search_summary/index.ts +++ b/x-pack/plugins/infra/common/log_search_summary/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { SearchSummaryBucket } from './log_search_summary'; +export type { SearchSummaryBucket } from './log_search_summary'; diff --git a/x-pack/plugins/infra/common/typed_json.ts b/x-pack/plugins/infra/common/typed_json.ts index fee846b437a7..95d5d4274c3b 100644 --- a/x-pack/plugins/infra/common/typed_json.ts +++ b/x-pack/plugins/infra/common/typed_json.ts @@ -8,7 +8,7 @@ import * as rt from 'io-ts'; import { JsonArray, JsonObject, JsonValue } from '@kbn/utility-types'; -export { JsonArray, JsonObject, JsonValue }; +export type { JsonArray, JsonObject, JsonValue }; export const jsonScalarRT = rt.union([rt.null, rt.boolean, rt.number, rt.string]); export type JsonScalar = rt.TypeOf; diff --git a/x-pack/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/validation.tsx b/x-pack/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/validation.tsx index b78a63e61e52..67b3fa164d90 100644 --- a/x-pack/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/validation.tsx +++ b/x-pack/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/validation.tsx @@ -9,7 +9,8 @@ import * as rt from 'io-ts'; import { ValidationIndicesError, validationIndicesErrorRT } from '../../../../../common/http_api'; import { DatasetFilter } from '../../../../../common/log_analysis'; -export { ValidationIndicesError, validationIndicesErrorRT }; +export type { ValidationIndicesError }; +export { validationIndicesErrorRT }; export const timeRangeValidationErrorRT = rt.strict({ error: rt.literal('INVALID_TIME_RANGE'), diff --git a/x-pack/plugins/infra/public/components/logging/log_text_stream/index.ts b/x-pack/plugins/infra/public/components/logging/log_text_stream/index.ts index c3716d8c97ae..dbd5bd49d024 100644 --- a/x-pack/plugins/infra/public/components/logging/log_text_stream/index.ts +++ b/x-pack/plugins/infra/public/components/logging/log_text_stream/index.ts @@ -5,12 +5,8 @@ * 2.0. */ -export { - LogEntryColumn, - LogEntryColumnWidths, - useColumnWidths, - iconColumnId, -} from './log_entry_column'; +export type { LogEntryColumnWidths } from './log_entry_column'; +export { LogEntryColumn, useColumnWidths, iconColumnId } from './log_entry_column'; export { LogEntryFieldColumn } from './log_entry_field_column'; export { LogEntryMessageColumn } from './log_entry_message_column'; export { LogEntryRowWrapper } from './log_entry_row'; diff --git a/x-pack/plugins/infra/public/containers/logs/log_analysis/api/get_latest_categories_datasets_stats.ts b/x-pack/plugins/infra/public/containers/logs/log_analysis/api/get_latest_categories_datasets_stats.ts index bfabcdb4af7c..d715fb9f4519 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_analysis/api/get_latest_categories_datasets_stats.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_analysis/api/get_latest_categories_datasets_stats.ts @@ -15,7 +15,7 @@ import { } from '../../../../../common/http_api'; import { decodeOrThrow } from '../../../../../common/runtime_types'; -export { LogEntryCategoriesDatasetStats }; +export type { LogEntryCategoriesDatasetStats }; export const callGetLatestCategoriesDatasetsStatsAPI = async ( { diff --git a/x-pack/plugins/infra/public/containers/logs/log_analysis/index.ts b/x-pack/plugins/infra/public/containers/logs/log_analysis/index.ts index 40ac39e3fa22..5cccbdb78e46 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_analysis/index.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_analysis/index.ts @@ -14,4 +14,4 @@ export * from './log_analysis_module_status'; export * from './log_analysis_module_types'; export * from './log_analysis_setup_state'; -export { JobModelSizeStats, JobSummary } from './api/ml_get_jobs_summary_api'; +export type { JobModelSizeStats, JobSummary } from './api/ml_get_jobs_summary_api'; diff --git a/x-pack/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_types.ts b/x-pack/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_types.ts index 4ff8c0c3c08e..c8ce9a7b0127 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_types.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_types.ts @@ -17,7 +17,7 @@ import { FetchJobStatusResponsePayload } from './api/ml_get_jobs_summary_api'; import { GetMlModuleResponsePayload } from './api/ml_get_module'; import { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; -export { JobModelSizeStats, JobSummary } from './api/ml_get_jobs_summary_api'; +export type { JobModelSizeStats, JobSummary } from './api/ml_get_jobs_summary_api'; export interface ModuleDescriptor { moduleId: string; diff --git a/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts b/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts index 8f744a1d6df6..54f3f70b98a4 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts @@ -26,14 +26,14 @@ import { callFetchLogSourceConfigurationAPI } from './api/fetch_log_source_confi import { callFetchLogSourceStatusAPI } from './api/fetch_log_source_status'; import { callPatchLogSourceConfigurationAPI } from './api/patch_log_source_configuration'; -export { +export type { LogIndexField, LogSourceConfiguration, LogSourceConfigurationProperties, LogSourceConfigurationPropertiesPatch, LogSourceStatus, - ResolveLogSourceConfigurationError, }; +export { ResolveLogSourceConfigurationError }; export const useLogSource = ({ sourceId, diff --git a/x-pack/plugins/infra/public/containers/ml/infra_ml_module_types.ts b/x-pack/plugins/infra/public/containers/ml/infra_ml_module_types.ts index 5a5272f78305..ca655f35f746 100644 --- a/x-pack/plugins/infra/public/containers/ml/infra_ml_module_types.ts +++ b/x-pack/plugins/infra/public/containers/ml/infra_ml_module_types.ts @@ -15,7 +15,7 @@ import { FetchJobStatusResponsePayload } from './api/ml_get_jobs_summary_api'; import { GetMlModuleResponsePayload } from './api/ml_get_module'; import { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; -export { JobModelSizeStats, JobSummary } from './api/ml_get_jobs_summary_api'; +export type { JobModelSizeStats, JobSummary } from './api/ml_get_jobs_summary_api'; export interface SetUpModuleArgs { start?: number | undefined; diff --git a/x-pack/plugins/infra/public/utils/loading_state/index.ts b/x-pack/plugins/infra/public/utils/loading_state/index.ts index f0f42f1afa6a..f93d0638b336 100644 --- a/x-pack/plugins/infra/public/utils/loading_state/index.ts +++ b/x-pack/plugins/infra/public/utils/loading_state/index.ts @@ -5,18 +5,21 @@ * 2.0. */ -export { initialLoadingState, LoadingState } from './loading_state'; +export type { LoadingState } from './loading_state'; +export { initialLoadingState } from './loading_state'; -export { isManualLoadingPolicy, isIntervalLoadingPolicy, LoadingPolicy } from './loading_policy'; +export type { LoadingPolicy } from './loading_policy'; +export { isManualLoadingPolicy, isIntervalLoadingPolicy } from './loading_policy'; +export type { LoadingProgress } from './loading_progress'; export { createRunningProgressReducer, createIdleProgressReducer, isIdleLoadingProgress, isRunningLoadingProgress, - LoadingProgress, } from './loading_progress'; +export type { LoadingResult } from './loading_result'; export { createFailureResult, createFailureResultReducer, @@ -27,5 +30,4 @@ export { isFailureLoadingResult, isSuccessLoadingResult, isUninitializedLoadingResult, - LoadingResult, } from './loading_result'; diff --git a/x-pack/plugins/infra/server/index.ts b/x-pack/plugins/infra/server/index.ts index a25bba48d673..93be23356dfc 100644 --- a/x-pack/plugins/infra/server/index.ts +++ b/x-pack/plugins/infra/server/index.ts @@ -8,8 +8,9 @@ import { PluginInitializerContext } from 'src/core/server'; import { config, InfraConfig, InfraServerPlugin, InfraPluginSetup } from './plugin'; -export { config, InfraConfig, InfraPluginSetup }; -export { InfraRequestHandlerContext } from './types'; +export type { InfraConfig, InfraPluginSetup }; +export { config }; +export type { InfraRequestHandlerContext } from './types'; export function plugin(context: PluginInitializerContext) { return new InfraServerPlugin(context); diff --git a/x-pack/plugins/infra/server/lib/infra_ml/index.ts b/x-pack/plugins/infra/server/lib/infra_ml/index.ts index 82093b1a359d..853ef8d0d60b 100644 --- a/x-pack/plugins/infra/server/lib/infra_ml/index.ts +++ b/x-pack/plugins/infra/server/lib/infra_ml/index.ts @@ -8,4 +8,4 @@ export * from './errors'; export * from './metrics_hosts_anomalies'; export * from './metrics_k8s_anomalies'; -export { MappedAnomalyHit } from './common'; +export type { MappedAnomalyHit } from './common'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/index.ts index 5c59e6c0e244..0d63e9cd2462 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/index.ts @@ -5,9 +5,11 @@ * 2.0. */ -export { ProcessorForm, ProcessorFormOnSubmitArg, OnSubmitHandler } from './processor_form'; +export type { ProcessorFormOnSubmitArg, OnSubmitHandler } from './processor_form'; +export { ProcessorForm } from './processor_form'; -export { ProcessorsTree, ProcessorInfo, OnActionHandler } from './processors_tree'; +export type { ProcessorInfo, OnActionHandler } from './processors_tree'; +export { ProcessorsTree } from './processors_tree'; export { PipelineProcessorsEditor } from './pipeline_processors_editor'; @@ -15,11 +17,13 @@ export { PipelineProcessorsEditorItem } from './pipeline_processors_editor_item' export { ProcessorRemoveModal } from './processor_remove_modal'; -export { OnDoneLoadJsonHandler, LoadFromJsonButton } from './load_from_json'; +export type { OnDoneLoadJsonHandler } from './load_from_json'; +export { LoadFromJsonButton } from './load_from_json'; export { TestPipelineActions } from './test_pipeline'; -export { PipelineProcessorsItemTooltip, Position } from './pipeline_processors_editor_item_tooltip'; +export type { Position } from './pipeline_processors_editor_item_tooltip'; +export { PipelineProcessorsItemTooltip } from './pipeline_processors_editor_item_tooltip'; export { ProcessorsEmptyPrompt } from './processors_empty_prompt'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/index.ts index 2e89e4b907f0..1d8fd204b458 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/load_from_json/index.ts @@ -6,4 +6,4 @@ */ export { LoadFromJsonButton } from './button'; -export { OnDoneLoadJsonHandler } from './modal_provider'; +export type { OnDoneLoadJsonHandler } from './modal_provider'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/pipeline_processors_editor_item/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/pipeline_processors_editor_item/index.ts index a88f51cda2eb..8b029747c1cb 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/pipeline_processors_editor_item/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/pipeline_processors_editor_item/index.ts @@ -7,4 +7,4 @@ export { PipelineProcessorsEditorItem } from './pipeline_processors_editor_item.container'; -export { Handlers } from './types'; +export type { Handlers } from './types'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/pipeline_processors_editor_item_tooltip/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/pipeline_processors_editor_item_tooltip/index.ts index e51d286a2b01..f8967a8945b2 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/pipeline_processors_editor_item_tooltip/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/pipeline_processors_editor_item_tooltip/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { PipelineProcessorsItemTooltip, Position } from './pipeline_processors_editor_item_tooltip'; +export type { Position } from './pipeline_processors_editor_item_tooltip'; +export { PipelineProcessorsItemTooltip } from './pipeline_processors_editor_item_tooltip'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processor_form/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processor_form/index.ts index 75c0e4ec7ccc..1418c919cb6b 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processor_form/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processor_form/index.ts @@ -5,8 +5,5 @@ * 2.0. */ -export { - ProcessorFormContainer as ProcessorForm, - ProcessorFormOnSubmitArg, - OnSubmitHandler, -} from './processor_form.container'; +export type { ProcessorFormOnSubmitArg, OnSubmitHandler } from './processor_form.container'; +export { ProcessorFormContainer as ProcessorForm } from './processor_form.container'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processor_form/processors/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processor_form/processors/index.ts index 1a2422b40d0b..e3a0fae36e57 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processor_form/processors/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processor_form/processors/index.ts @@ -45,4 +45,4 @@ export { UrlDecode } from './url_decode'; export { UserAgent } from './user_agent'; export { UriParts } from './uri_parts'; -export { FormFieldsComponent } from './shared'; +export type { FormFieldsComponent } from './shared'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processors_tree/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processors_tree/index.ts index e8ac8bce8c4c..3cb4f1f0f350 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processors_tree/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/processors_tree/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ProcessorsTree, OnActionHandler, ProcessorInfo } from './processors_tree'; +export type { OnActionHandler, ProcessorInfo } from './processors_tree'; +export { ProcessorsTree } from './processors_tree'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/shared/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/shared/index.ts index d62ebab7c650..8d71908bca5e 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/shared/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/shared/index.ts @@ -5,10 +5,7 @@ * 2.0. */ -export { - getProcessorDescriptor, - mapProcessorTypeToDescriptor, - ProcessorType, -} from './map_processor_type_to_form'; +export type { ProcessorType } from './map_processor_type_to_form'; +export { getProcessorDescriptor, mapProcessorTypeToDescriptor } from './map_processor_type_to_form'; export { ErrorIcon, ErrorIgnoredIcon, SkippedIcon } from './status_icons'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/test_pipeline/test_pipeline_tabs/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/test_pipeline/test_pipeline_tabs/index.ts index 725f65f28ab9..82ba99a43852 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/test_pipeline/test_pipeline_tabs/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/components/test_pipeline/test_pipeline_tabs/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -export { Tabs, TestPipelineFlyoutTab } from './test_pipeline_tabs'; +export type { TestPipelineFlyoutTab } from './test_pipeline_tabs'; +export { Tabs } from './test_pipeline_tabs'; export { DocumentsTab } from './tab_documents'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/context/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/context/index.ts index 261393e35a2b..6a83b29dc0d0 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/context/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/context/index.ts @@ -7,15 +7,11 @@ export { ProcessorsEditorContextProvider } from './context'; -export { - TestPipelineContextProvider, - useTestPipelineContext, - TestPipelineData, - TestPipelineContext, -} from './test_pipeline_context'; +export type { TestPipelineData, TestPipelineContext } from './test_pipeline_context'; +export { TestPipelineContextProvider, useTestPipelineContext } from './test_pipeline_context'; +export type { Props } from './processors_context'; export { PipelineProcessorsContextProvider, usePipelineProcessorsContext, - Props, } from './processors_context'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/index.ts index 3149abeb8e1e..a3996721ed74 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/index.ts @@ -5,12 +5,13 @@ * 2.0. */ -export { Props, ProcessorsEditorContextProvider } from './context'; +export type { Props } from './context'; +export { ProcessorsEditorContextProvider } from './context'; -export { OnUpdateHandlerArg, OnUpdateHandler } from './types'; +export type { OnUpdateHandlerArg, OnUpdateHandler } from './types'; -export { SerializeResult } from './serialize'; +export type { SerializeResult } from './serialize'; -export { OnDoneLoadJsonHandler } from './components'; +export type { OnDoneLoadJsonHandler } from './components'; export { PipelineEditor } from './pipeline_editor'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/index.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/index.ts index 664e82e81a12..59753e5cfdbb 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/index.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/processors_reducer/index.ts @@ -5,13 +5,8 @@ * 2.0. */ -export { - State, - reducer, - useProcessorsState, - ProcessorsDispatch, - Action, -} from './processors_reducer'; +export type { State, ProcessorsDispatch, Action } from './processors_reducer'; +export { reducer, useProcessorsState } from './processors_reducer'; export * from './constants'; diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/types.ts b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/types.ts index efb2c4a42c76..fba905d8e26b 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/types.ts +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/types.ts @@ -31,7 +31,7 @@ export interface ProcessorInternal { onFailure?: ProcessorInternal[]; } -export { OnFormUpdateArg }; +export type { OnFormUpdateArg }; export interface FormValidityState { validate: OnFormUpdateArg['validate']; diff --git a/x-pack/plugins/ingest_pipelines/public/shared_imports.ts b/x-pack/plugins/ingest_pipelines/public/shared_imports.ts index 29be11430bf6..bcc0060c1e5d 100644 --- a/x-pack/plugins/ingest_pipelines/public/shared_imports.ts +++ b/x-pack/plugins/ingest_pipelines/public/shared_imports.ts @@ -10,51 +10,55 @@ import { AppServices } from './application'; export { CodeEditor }; +export type { + Error, + SendRequestConfig, + SendRequestResponse, + UseRequestConfig, + OnJsonEditorUpdateHandler, +} from '../../../../src/plugins/es_ui_shared/public/'; export { AuthorizationProvider, - Error, NotAuthorizedSection, SectionError, SectionLoading, sendRequest, - SendRequestConfig, - SendRequestResponse, useAuthorizationContext, useRequest, - UseRequestConfig, WithPrivileges, XJson, JsonEditor, - OnJsonEditorUpdateHandler, attemptToURIDecode, } from '../../../../src/plugins/es_ui_shared/public/'; -export { +export type { FormSchema, - FIELD_TYPES, FormConfig, - useForm, - Form, - getUseField, ValidationFuncArg, FormData, - UseField, - UseArray, ArrayItem, FormHook, - useFormContext, - UseMultiFields, - FormDataProvider, OnFormUpdateArg, FieldConfig, FieldHook, - getFieldValidityAndErrorMessage, ValidationFunc, ValidationConfig, - useFormData, FormOptions, SerializerFunc, } from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; +export { + FIELD_TYPES, + useForm, + Form, + getUseField, + UseField, + UseArray, + useFormContext, + UseMultiFields, + FormDataProvider, + getFieldValidityAndErrorMessage, + useFormData, +} from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; export { fieldFormatters, diff --git a/x-pack/plugins/lens/public/index.ts b/x-pack/plugins/lens/public/index.ts index 9be07a4f44dc..fb7cefb22d17 100644 --- a/x-pack/plugins/lens/public/index.ts +++ b/x-pack/plugins/lens/public/index.ts @@ -58,6 +58,6 @@ export type { } from './indexpattern_datasource/types'; export type { LensEmbeddableInput } from './embeddable'; -export { LensPublicStart } from './plugin'; +export type { LensPublicStart } from './plugin'; export const plugin = () => new LensPlugin(); diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx b/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx index d90dc83bc1fe..bdcc0e621cc3 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx +++ b/x-pack/plugins/lens/public/indexpattern_datasource/indexpattern.tsx @@ -58,7 +58,8 @@ import { GeoFieldWorkspacePanel } from '../editor_frame_service/editor_frame/wor import { DraggingIdentifier } from '../drag_drop'; import { getStateTimeShiftWarningMessages } from './time_shift_utils'; -export { OperationType, IndexPatternColumn, deleteColumn } from './operations'; +export type { OperationType, IndexPatternColumn } from './operations'; +export { deleteColumn } from './operations'; export function columnToOperation(column: IndexPatternColumn, uniqueLabel?: string): Operation { const { dataType, label, isBucketed, scale } = column; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/index.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/index.ts index a7741bc60d64..1ffbdea00b77 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/index.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/index.ts @@ -5,17 +5,23 @@ * 2.0. */ -export { counterRateOperation, CounterRateIndexPatternColumn } from './counter_rate'; -export { cumulativeSumOperation, CumulativeSumIndexPatternColumn } from './cumulative_sum'; -export { derivativeOperation, DerivativeIndexPatternColumn } from './differences'; -export { movingAverageOperation, MovingAverageIndexPatternColumn } from './moving_average'; -export { - overallSumOperation, +export type { CounterRateIndexPatternColumn } from './counter_rate'; +export { counterRateOperation } from './counter_rate'; +export type { CumulativeSumIndexPatternColumn } from './cumulative_sum'; +export { cumulativeSumOperation } from './cumulative_sum'; +export type { DerivativeIndexPatternColumn } from './differences'; +export { derivativeOperation } from './differences'; +export type { MovingAverageIndexPatternColumn } from './moving_average'; +export { movingAverageOperation } from './moving_average'; +export type { OverallSumIndexPatternColumn, - overallMinOperation, OverallMinIndexPatternColumn, - overallMaxOperation, OverallMaxIndexPatternColumn, - overallAverageOperation, OverallAverageIndexPatternColumn, } from './overall_metric'; +export { + overallSumOperation, + overallMinOperation, + overallMaxOperation, + overallAverageOperation, +} from './overall_metric'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/index.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/index.ts index bafde0d37b3e..5ff0c4e2d4bd 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/index.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/formula/index.ts @@ -5,6 +5,8 @@ * 2.0. */ -export { formulaOperation, FormulaIndexPatternColumn } from './formula'; +export type { FormulaIndexPatternColumn } from './formula'; +export { formulaOperation } from './formula'; export { regenerateLayerFromAst } from './parse'; -export { mathOperation, MathIndexPatternColumn } from './math'; +export type { MathIndexPatternColumn } from './math'; +export { mathOperation } from './math'; diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts index 0212c73f4687..392b2b135ca2 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts @@ -93,21 +93,21 @@ export type IndexPatternColumn = export type FieldBasedIndexPatternColumn = Extract; -export { IncompleteColumn } from './column_types'; +export type { IncompleteColumn } from './column_types'; -export { TermsIndexPatternColumn } from './terms'; -export { FiltersIndexPatternColumn } from './filters'; -export { CardinalityIndexPatternColumn } from './cardinality'; -export { PercentileIndexPatternColumn } from './percentile'; -export { +export type { TermsIndexPatternColumn } from './terms'; +export type { FiltersIndexPatternColumn } from './filters'; +export type { CardinalityIndexPatternColumn } from './cardinality'; +export type { PercentileIndexPatternColumn } from './percentile'; +export type { MinIndexPatternColumn, AvgIndexPatternColumn, SumIndexPatternColumn, MaxIndexPatternColumn, MedianIndexPatternColumn, } from './metrics'; -export { DateHistogramIndexPatternColumn } from './date_histogram'; -export { +export type { DateHistogramIndexPatternColumn } from './date_histogram'; +export type { CumulativeSumIndexPatternColumn, CounterRateIndexPatternColumn, DerivativeIndexPatternColumn, @@ -117,11 +117,11 @@ export { OverallMaxIndexPatternColumn, OverallAverageIndexPatternColumn, } from './calculations'; -export { CountIndexPatternColumn } from './count'; -export { LastValueIndexPatternColumn } from './last_value'; -export { RangeIndexPatternColumn } from './ranges'; -export { FormulaIndexPatternColumn, MathIndexPatternColumn } from './formula'; -export { StaticValueIndexPatternColumn } from './static_value'; +export type { CountIndexPatternColumn } from './count'; +export type { LastValueIndexPatternColumn } from './last_value'; +export type { RangeIndexPatternColumn } from './ranges'; +export type { FormulaIndexPatternColumn, MathIndexPatternColumn } from './formula'; +export type { StaticValueIndexPatternColumn } from './static_value'; // List of all operation definitions registered to this data source. // If you want to implement a new operation, add the definition to this array and diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts index 7899ce9efced..86add22b2b8c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/index.ts @@ -8,7 +8,7 @@ export * from './operations'; export * from './layer_helpers'; export * from './time_scale_utils'; -export { +export type { OperationType, IndexPatternColumn, FieldBasedIndexPatternColumn, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/types.ts b/x-pack/plugins/lens/public/indexpattern_datasource/types.ts index 588b25952027..515693b4dd5c 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/types.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/types.ts @@ -11,7 +11,7 @@ import type { FieldSpec } from '../../../../../src/plugins/data/common'; import type { DragDropIdentifier } from '../drag_drop/providers'; import type { FieldFormatParams } from '../../../../../src/plugins/field_formats/common'; -export { +export type { FieldBasedIndexPatternColumn, IndexPatternColumn, OperationType, diff --git a/x-pack/plugins/lens/public/mocks/index.ts b/x-pack/plugins/lens/public/mocks/index.ts index 2dd32a1679f1..e9f03cde2642 100644 --- a/x-pack/plugins/lens/public/mocks/index.ts +++ b/x-pack/plugins/lens/public/mocks/index.ts @@ -16,12 +16,12 @@ export { datasourceMap, mockDatasourceMap, createMockDatasource } from './dataso export type { DatasourceMock } from './datasource_mock'; export { createExpressionRendererMock } from './expression_renderer_mock'; export { defaultDoc, exactMatchDoc, makeDefaultServices } from './services_mock'; +export type { MountStoreProps } from './store_mocks'; export { mockStoreDeps, mockDatasourceStates, defaultState, makeLensStore, - MountStoreProps, mountWithProvider, } from './store_mocks'; export { lensPluginMock } from './lens_plugin_mock'; diff --git a/x-pack/plugins/lens/public/shared_components/index.ts b/x-pack/plugins/lens/public/shared_components/index.ts index f268d6816910..9ffddaa1a135 100644 --- a/x-pack/plugins/lens/public/shared_components/index.ts +++ b/x-pack/plugins/lens/public/shared_components/index.ts @@ -6,7 +6,8 @@ */ export * from './empty_placeholder'; -export { ToolbarPopoverProps, ToolbarPopover } from './toolbar_popover'; +export type { ToolbarPopoverProps } from './toolbar_popover'; +export { ToolbarPopover } from './toolbar_popover'; export { LegendSettingsPopover } from './legend_settings_popover'; export { PalettePicker } from './palette_picker'; export { TooltipWrapper } from './tooltip_wrapper'; diff --git a/x-pack/plugins/license_management/public/application/index.tsx b/x-pack/plugins/license_management/public/application/index.tsx index a289a40e72da..16b6ebb1afdf 100644 --- a/x-pack/plugins/license_management/public/application/index.tsx +++ b/x-pack/plugins/license_management/public/application/index.tsx @@ -36,4 +36,4 @@ export const renderApp = (element: Element, dependencies: AppDependencies) => { }; }; -export { AppDependencies }; +export type { AppDependencies }; diff --git a/x-pack/plugins/license_management/public/index.ts b/x-pack/plugins/license_management/public/index.ts index d36a08a999f4..c63cab6f4ad0 100644 --- a/x-pack/plugins/license_management/public/index.ts +++ b/x-pack/plugins/license_management/public/index.ts @@ -9,5 +9,5 @@ import { PluginInitializerContext } from 'src/core/public'; import { LicenseManagementUIPlugin } from './plugin'; import './application/index.scss'; -export { LicenseManagementUIPluginSetup, LicenseManagementUIPluginStart } from './plugin'; +export type { LicenseManagementUIPluginSetup, LicenseManagementUIPluginStart } from './plugin'; export const plugin = (ctx: PluginInitializerContext) => new LicenseManagementUIPlugin(ctx); diff --git a/x-pack/plugins/lists/server/index.ts b/x-pack/plugins/lists/server/index.ts index 9f395cb0d94b..d8e13e86329c 100644 --- a/x-pack/plugins/lists/server/index.ts +++ b/x-pack/plugins/lists/server/index.ts @@ -12,7 +12,7 @@ import { ListPlugin } from './plugin'; // exporting these since its required at top level in siem plugin export { ListClient } from './services/lists/list_client'; -export { +export type { CreateExceptionListItemOptions, UpdateExceptionListItemOptions, } from './services/exception_lists/exception_list_client_types'; diff --git a/x-pack/plugins/maps/common/elasticsearch_util/index.ts b/x-pack/plugins/maps/common/elasticsearch_util/index.ts index 6febb237cdda..b5b20d70a7c7 100644 --- a/x-pack/plugins/maps/common/elasticsearch_util/index.ts +++ b/x-pack/plugins/maps/common/elasticsearch_util/index.ts @@ -9,4 +9,5 @@ export * from './es_agg_utils'; export * from './elasticsearch_geo_utils'; export * from './spatial_filter_utils'; export * from './types'; -export { isTotalHitsGreaterThan, TotalHits } from './total_hits'; +export type { TotalHits } from './total_hits'; +export { isTotalHitsGreaterThan } from './total_hits'; diff --git a/x-pack/plugins/maps/common/index.ts b/x-pack/plugins/maps/common/index.ts index 8374a4d0dbaa..517ed0bceff1 100644 --- a/x-pack/plugins/maps/common/index.ts +++ b/x-pack/plugins/maps/common/index.ts @@ -19,7 +19,7 @@ export { SYMBOLIZE_AS_TYPES, } from './constants'; -export { +export type { EMSFileSourceDescriptor, ESTermSourceDescriptor, LayerDescriptor, diff --git a/x-pack/plugins/maps/public/actions/index.ts b/x-pack/plugins/maps/public/actions/index.ts index 4c869698d5ac..f4d6997333c6 100644 --- a/x-pack/plugins/maps/public/actions/index.ts +++ b/x-pack/plugins/maps/public/actions/index.ts @@ -10,9 +10,9 @@ export * from './ui_actions'; export * from './map_actions'; export * from './map_action_constants'; export * from './layer_actions'; +export type { DataRequestContext } from './data_request_actions'; export { cancelAllInFlightRequests, - DataRequestContext, fitToLayerExtent, fitToDataBounds, } from './data_request_actions'; diff --git a/x-pack/plugins/maps/public/api/index.ts b/x-pack/plugins/maps/public/api/index.ts index 9cf7577f448b..0bbeca6f8160 100644 --- a/x-pack/plugins/maps/public/api/index.ts +++ b/x-pack/plugins/maps/public/api/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export { MapsStartApi } from './start_api'; -export { MapsSetupApi } from './setup_api'; +export type { MapsStartApi } from './start_api'; +export type { MapsSetupApi } from './setup_api'; export { createLayerDescriptors } from './create_layer_descriptors'; export { suggestEMSTermJoinConfig } from './ems'; diff --git a/x-pack/plugins/maps/public/classes/fields/agg/index.ts b/x-pack/plugins/maps/public/classes/fields/agg/index.ts index f8de2db85db9..bd0b5184fe15 100644 --- a/x-pack/plugins/maps/public/classes/fields/agg/index.ts +++ b/x-pack/plugins/maps/public/classes/fields/agg/index.ts @@ -6,4 +6,4 @@ */ export { esAggFieldsFactory } from './es_agg_factory'; -export { IESAggField } from './agg_field_types'; +export type { IESAggField } from './agg_field_types'; diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/index.ts b/x-pack/plugins/maps/public/classes/layers/vector_layer/index.ts index cb964f77613d..2b14b78f9294 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/index.ts +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/index.ts @@ -6,10 +6,5 @@ */ export { addGeoJsonMbSource, getVectorSourceBounds, syncVectorSource } from './utils'; -export { - isVectorLayer, - IVectorLayer, - VectorLayer, - VectorLayerArguments, - NO_RESULTS_ICON_AND_TOOLTIPCONTENT, -} from './vector_layer'; +export type { IVectorLayer, VectorLayerArguments } from './vector_layer'; +export { isVectorLayer, VectorLayer, NO_RESULTS_ICON_AND_TOOLTIPCONTENT } from './vector_layer'; diff --git a/x-pack/plugins/maps/public/classes/sources/ems_file_source/index.ts b/x-pack/plugins/maps/public/classes/sources/ems_file_source/index.ts index 2d4d59c5c415..6c9d7060e9a4 100644 --- a/x-pack/plugins/maps/public/classes/sources/ems_file_source/index.ts +++ b/x-pack/plugins/maps/public/classes/sources/ems_file_source/index.ts @@ -6,4 +6,5 @@ */ export { emsBoundariesLayerWizardConfig } from './ems_boundaries_layer_wizard'; -export { EMSFileSource, IEmsFileSource } from './ems_file_source'; +export type { IEmsFileSource } from './ems_file_source'; +export { EMSFileSource } from './ems_file_source'; diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts b/x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts index 75217c0a29c0..54686f91c133 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts +++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -export { createLayerDescriptor, CreateLayerDescriptorParams } from './create_layer_descriptor'; +export type { CreateLayerDescriptorParams } from './create_layer_descriptor'; +export { createLayerDescriptor } from './create_layer_descriptor'; export { ESSearchSource } from './es_search_source'; export { createDefaultLayerDescriptor, diff --git a/x-pack/plugins/maps/public/classes/sources/term_join_source/index.ts b/x-pack/plugins/maps/public/classes/sources/term_join_source/index.ts index a40533d98be8..78f7705104f7 100644 --- a/x-pack/plugins/maps/public/classes/sources/term_join_source/index.ts +++ b/x-pack/plugins/maps/public/classes/sources/term_join_source/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { ITermJoinSource } from './term_join_source'; +export type { ITermJoinSource } from './term_join_source'; diff --git a/x-pack/plugins/maps/public/classes/sources/tiled_single_layer_vector_source/index.ts b/x-pack/plugins/maps/public/classes/sources/tiled_single_layer_vector_source/index.ts index 30177751a8d5..c60cedba61c8 100644 --- a/x-pack/plugins/maps/public/classes/sources/tiled_single_layer_vector_source/index.ts +++ b/x-pack/plugins/maps/public/classes/sources/tiled_single_layer_vector_source/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { ITiledSingleLayerVectorSource } from './tiled_single_layer_vector_source'; +export type { ITiledSingleLayerVectorSource } from './tiled_single_layer_vector_source'; diff --git a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/join_editor/index.ts b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/join_editor/index.ts index 7971017a3d52..570c1ba8fb89 100644 --- a/x-pack/plugins/maps/public/connected_components/edit_layer_panel/join_editor/index.ts +++ b/x-pack/plugins/maps/public/connected_components/edit_layer_panel/join_editor/index.ts @@ -31,4 +31,4 @@ function mapDispatchToProps(dispatch: ThunkDispatch { public readonly id = ML_APP_LOCATOR; diff --git a/x-pack/plugins/ml/server/lib/capabilities/index.ts b/x-pack/plugins/ml/server/lib/capabilities/index.ts index 623ebe56085f..7c27aee6bf4a 100644 --- a/x-pack/plugins/ml/server/lib/capabilities/index.ts +++ b/x-pack/plugins/ml/server/lib/capabilities/index.ts @@ -5,9 +5,6 @@ * 2.0. */ -export { - capabilitiesProvider, - hasMlCapabilitiesProvider, - HasMlCapabilities, -} from './check_capabilities'; +export type { HasMlCapabilities } from './check_capabilities'; +export { capabilitiesProvider, hasMlCapabilitiesProvider } from './check_capabilities'; export { setupCapabilitiesSwitcher } from './capabilities_switcher'; diff --git a/x-pack/plugins/ml/server/lib/ml_client/index.ts b/x-pack/plugins/ml/server/lib/ml_client/index.ts index 509b83ef1edf..b5329ba2cfbc 100644 --- a/x-pack/plugins/ml/server/lib/ml_client/index.ts +++ b/x-pack/plugins/ml/server/lib/ml_client/index.ts @@ -7,4 +7,4 @@ export { getMlClient } from './ml_client'; export { MLJobNotFound } from './errors'; -export { MlClient } from './types'; +export type { MlClient } from './types'; diff --git a/x-pack/plugins/ml/server/models/calendar/index.ts b/x-pack/plugins/ml/server/models/calendar/index.ts index c5177dd675ca..ca05246dff01 100644 --- a/x-pack/plugins/ml/server/models/calendar/index.ts +++ b/x-pack/plugins/ml/server/models/calendar/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { CalendarManager, Calendar, FormCalendar } from './calendar_manager'; +export type { Calendar, FormCalendar } from './calendar_manager'; +export { CalendarManager } from './calendar_manager'; diff --git a/x-pack/plugins/ml/server/models/data_frame_analytics/types.ts b/x-pack/plugins/ml/server/models/data_frame_analytics/types.ts index c9cca5756ada..216cfe50cc53 100644 --- a/x-pack/plugins/ml/server/models/data_frame_analytics/types.ts +++ b/x-pack/plugins/ml/server/models/data_frame_analytics/types.ts @@ -11,7 +11,7 @@ import { AnalyticsMapNodeElement, AnalyticsMapEdgeElement, } from '../../../common/types/data_frame_analytics'; -export { +export type { MapElements, AnalyticsMapReturnType, AnalyticsMapNodeElement, diff --git a/x-pack/plugins/ml/server/models/data_recognizer/index.ts b/x-pack/plugins/ml/server/models/data_recognizer/index.ts index fbddf17a50ed..55595c3a12bd 100644 --- a/x-pack/plugins/ml/server/models/data_recognizer/index.ts +++ b/x-pack/plugins/ml/server/models/data_recognizer/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { DataRecognizer, RecognizeResult, dataRecognizerFactory } from './data_recognizer'; +export type { RecognizeResult } from './data_recognizer'; +export { DataRecognizer, dataRecognizerFactory } from './data_recognizer'; diff --git a/x-pack/plugins/ml/server/models/filter/index.ts b/x-pack/plugins/ml/server/models/filter/index.ts index d5663478b481..678fe73007ea 100644 --- a/x-pack/plugins/ml/server/models/filter/index.ts +++ b/x-pack/plugins/ml/server/models/filter/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { FilterManager, FormFilter, UpdateFilter } from './filter_manager'; +export type { FormFilter, UpdateFilter } from './filter_manager'; +export { FilterManager } from './filter_manager'; diff --git a/x-pack/plugins/ml/server/saved_objects/index.ts b/x-pack/plugins/ml/server/saved_objects/index.ts index cbd31c926113..652f47122ae2 100644 --- a/x-pack/plugins/ml/server/saved_objects/index.ts +++ b/x-pack/plugins/ml/server/saved_objects/index.ts @@ -6,7 +6,8 @@ */ export { setupSavedObjects } from './saved_objects'; -export { JobObject, JobSavedObjectService, jobSavedObjectServiceFactory } from './service'; +export type { JobObject, JobSavedObjectService } from './service'; +export { jobSavedObjectServiceFactory } from './service'; export { checksFactory } from './checks'; export { syncSavedObjectsFactory } from './sync'; export { jobSavedObjectsInitializationFactory } from './initialization'; diff --git a/x-pack/plugins/ml/server/shared_services/index.ts b/x-pack/plugins/ml/server/shared_services/index.ts index 4126850918f6..3a38b0b76bac 100644 --- a/x-pack/plugins/ml/server/shared_services/index.ts +++ b/x-pack/plugins/ml/server/shared_services/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { SharedServices, createSharedServices } from './shared_services'; +export type { SharedServices } from './shared_services'; +export { createSharedServices } from './shared_services'; diff --git a/x-pack/plugins/ml/server/shared_services/license_checks/index.ts b/x-pack/plugins/ml/server/shared_services/license_checks/index.ts index 5939ff18a937..9810084488ca 100644 --- a/x-pack/plugins/ml/server/shared_services/license_checks/index.ts +++ b/x-pack/plugins/ml/server/shared_services/license_checks/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { LicenseCheck, licenseChecks } from './license_checks'; +export type { LicenseCheck } from './license_checks'; +export { licenseChecks } from './license_checks'; export { InsufficientBasicLicenseError, InsufficientFullLicenseError } from './errors'; diff --git a/x-pack/plugins/monitoring/public/types.ts b/x-pack/plugins/monitoring/public/types.ts index 4817ac235e2b..fa92cfacafdc 100644 --- a/x-pack/plugins/monitoring/public/types.ts +++ b/x-pack/plugins/monitoring/public/types.ts @@ -12,9 +12,9 @@ import { TriggersAndActionsUIPublicPluginStart } from '../../triggers_actions_ui import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -export { MonitoringConfig } from '../server'; +export type { MonitoringConfig } from '../server'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -export { MLJobs } from '../server/lib/elasticsearch/get_ml_jobs'; +export type { MLJobs } from '../server/lib/elasticsearch/get_ml_jobs'; export interface MonitoringStartPluginDependencies { navigation: NavigationStart; diff --git a/x-pack/plugins/monitoring/server/index.ts b/x-pack/plugins/monitoring/server/index.ts index 63cc61e50391..44aaff7d51c4 100644 --- a/x-pack/plugins/monitoring/server/index.ts +++ b/x-pack/plugins/monitoring/server/index.ts @@ -11,9 +11,9 @@ import { MonitoringPlugin } from './plugin'; import { configSchema } from './config'; import { deprecations } from './deprecations'; -export { KibanaSettingsCollector } from './kibana_monitoring/collectors'; -export { MonitoringConfig } from './config'; -export { MonitoringPluginSetup, IBulkUploader } from './types'; +export type { KibanaSettingsCollector } from './kibana_monitoring/collectors'; +export type { MonitoringConfig } from './config'; +export type { MonitoringPluginSetup, IBulkUploader } from './types'; export const plugin = (initContext: PluginInitializerContext) => new MonitoringPlugin(initContext); export const config: PluginConfigDescriptor> = { diff --git a/x-pack/plugins/monitoring/server/kibana_monitoring/collectors/index.ts b/x-pack/plugins/monitoring/server/kibana_monitoring/collectors/index.ts index 06d47f004472..9fa7ea8fdaf6 100644 --- a/x-pack/plugins/monitoring/server/kibana_monitoring/collectors/index.ts +++ b/x-pack/plugins/monitoring/server/kibana_monitoring/collectors/index.ts @@ -11,7 +11,8 @@ import { getSettingsCollector } from './get_settings_collector'; import { getMonitoringUsageCollector } from './get_usage_collector'; import { MonitoringConfig } from '../../config'; -export { KibanaSettingsCollector, getKibanaSettings } from './get_settings_collector'; +export type { KibanaSettingsCollector } from './get_settings_collector'; +export { getKibanaSettings } from './get_settings_collector'; export function registerCollectors( usageCollection: UsageCollectionSetup, diff --git a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/index.ts b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/index.ts index 8f474c028484..00f3370dfde5 100644 --- a/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/index.ts +++ b/x-pack/plugins/monitoring/server/lib/elasticsearch/nodes/index.ts @@ -7,6 +7,7 @@ export { getNodes } from './get_nodes'; export { getNodeSummary } from './get_node_summary'; -export { calculateNodeType, Node } from './calculate_node_type'; +export type { Node } from './calculate_node_type'; +export { calculateNodeType } from './calculate_node_type'; export { getNodeTypeClassLabel } from './get_node_type_class_label'; export { getDefaultNodeFromId } from './get_default_node_from_id'; diff --git a/x-pack/plugins/monitoring/server/lib/metrics/index.ts b/x-pack/plugins/monitoring/server/lib/metrics/index.ts index ba43a8c316d3..2fdaeb81ee62 100644 --- a/x-pack/plugins/monitoring/server/lib/metrics/index.ts +++ b/x-pack/plugins/monitoring/server/lib/metrics/index.ts @@ -9,9 +9,11 @@ export { ElasticsearchMetric } from './elasticsearch/classes'; // @ts-ignore export { KibanaClusterMetric, KibanaMetric } from './kibana/classes'; -export { ApmMetric, ApmClusterMetric, ApmMetricFields } from './apm/classes'; +export type { ApmMetricFields } from './apm/classes'; +export { ApmMetric, ApmClusterMetric } from './apm/classes'; // @ts-ignore export { LogstashClusterMetric, LogstashMetric } from './logstash/classes'; -export { BeatsClusterMetric, BeatsMetric, BeatsMetricFields } from './beats/classes'; +export type { BeatsMetricFields } from './beats/classes'; +export { BeatsClusterMetric, BeatsMetric } from './beats/classes'; // @ts-ignore export { metrics } from './metrics'; diff --git a/x-pack/plugins/observability/public/index.ts b/x-pack/plugins/observability/public/index.ts index 2dd380c3b768..3eebf8a84db1 100644 --- a/x-pack/plugins/observability/public/index.ts +++ b/x-pack/plugins/observability/public/index.ts @@ -51,12 +51,11 @@ export { export type { LazyObservabilityPageTemplateProps } from './components/shared'; +export type { UiTracker, TrackMetricOptions } from './hooks/use_track_metric'; export { useTrackPageview, useUiTracker, useTrackMetric, - UiTracker, - TrackMetricOptions, METRIC_TYPE, } from './hooks/use_track_metric'; @@ -83,8 +82,6 @@ export type { export { createObservabilityRuleTypeRegistryMock } from './rules/observability_rule_type_registry_mock'; export type { ExploratoryEmbeddableProps } from './components/shared/exploratory_view/embeddable/embeddable'; -export { - InspectorContextProvider, - AddInspectorRequest, -} from './context/inspector/inspector_context'; +export type { AddInspectorRequest } from './context/inspector/inspector_context'; +export { InspectorContextProvider } from './context/inspector/inspector_context'; export { useInspectorContext } from './context/inspector/use_inspector_context'; diff --git a/x-pack/plugins/observability/public/services/call_observability_api/types.ts b/x-pack/plugins/observability/public/services/call_observability_api/types.ts index 8722aecd9080..f517772821f4 100644 --- a/x-pack/plugins/observability/public/services/call_observability_api/types.ts +++ b/x-pack/plugins/observability/public/services/call_observability_api/types.ts @@ -31,4 +31,4 @@ export type ObservabilityClient = RouteRepositoryClient< ObservabilityClientOptions >; -export { ObservabilityAPIReturnType }; +export type { ObservabilityAPIReturnType }; diff --git a/x-pack/plugins/observability/server/index.ts b/x-pack/plugins/observability/server/index.ts index 22a469dbedbd..d4d7127d8bae 100644 --- a/x-pack/plugins/observability/server/index.ts +++ b/x-pack/plugins/observability/server/index.ts @@ -43,11 +43,5 @@ export type ObservabilityConfig = TypeOf; export const plugin = (initContext: PluginInitializerContext) => new ObservabilityPlugin(initContext); -export { - createOrUpdateIndex, - Mappings, - ObservabilityPluginSetup, - ScopedAnnotationsClient, - unwrapEsResponse, - WrappedElasticsearchClientError, -}; +export type { Mappings, ObservabilityPluginSetup, ScopedAnnotationsClient }; +export { createOrUpdateIndex, unwrapEsResponse, WrappedElasticsearchClientError }; diff --git a/x-pack/plugins/observability/server/routes/types.ts b/x-pack/plugins/observability/server/routes/types.ts index 5075b21fdf1f..b316b1fffc77 100644 --- a/x-pack/plugins/observability/server/routes/types.ts +++ b/x-pack/plugins/observability/server/routes/types.ts @@ -17,7 +17,7 @@ import { RuleDataPluginService } from '../../../rule_registry/server'; import { ObservabilityServerRouteRepository } from './get_global_observability_server_route_repository'; import { ObservabilityRequestHandlerContext } from '../types'; -export { ObservabilityServerRouteRepository }; +export type { ObservabilityServerRouteRepository }; export interface ObservabilityRouteHandlerResources { core: { diff --git a/x-pack/plugins/observability/typings/common.ts b/x-pack/plugins/observability/typings/common.ts index 2bc95447d920..368dd33f1f13 100644 --- a/x-pack/plugins/observability/typings/common.ts +++ b/x-pack/plugins/observability/typings/common.ts @@ -23,6 +23,6 @@ export type PromiseReturnType = Func extends (...args: any[]) => Promise new RemoteClustersUIPlugin(initializerContext); diff --git a/x-pack/plugins/remote_clusters/public/types.ts b/x-pack/plugins/remote_clusters/public/types.ts index 15a34c84bb30..bcd162599ab7 100644 --- a/x-pack/plugins/remote_clusters/public/types.ts +++ b/x-pack/plugins/remote_clusters/public/types.ts @@ -23,6 +23,6 @@ export interface ClientConfigType { }; } -export { RegisterManagementAppArgs }; +export type { RegisterManagementAppArgs }; -export { I18nStart }; +export type { I18nStart }; diff --git a/x-pack/plugins/remote_clusters/server/index.ts b/x-pack/plugins/remote_clusters/server/index.ts index 33be5d88a3e4..9447f9d9209e 100644 --- a/x-pack/plugins/remote_clusters/server/index.ts +++ b/x-pack/plugins/remote_clusters/server/index.ts @@ -9,6 +9,6 @@ import { PluginInitializerContext } from 'kibana/server'; import { RemoteClustersServerPlugin } from './plugin'; export { config } from './config'; -export { RemoteClustersPluginSetup } from './plugin'; +export type { RemoteClustersPluginSetup } from './plugin'; export const plugin = (ctx: PluginInitializerContext) => new RemoteClustersServerPlugin(ctx); diff --git a/x-pack/plugins/reporting/public/share_context_menu/reporting_panel_content/index.ts b/x-pack/plugins/reporting/public/share_context_menu/reporting_panel_content/index.ts index 843a0b6747e4..94ee7f940b91 100644 --- a/x-pack/plugins/reporting/public/share_context_menu/reporting_panel_content/index.ts +++ b/x-pack/plugins/reporting/public/share_context_menu/reporting_panel_content/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ReportingPanelContent, Props, ReportingPanelProps } from './reporting_panel_content'; +export type { Props, ReportingPanelProps } from './reporting_panel_content'; +export { ReportingPanelContent } from './reporting_panel_content'; diff --git a/x-pack/plugins/reporting/public/shared_imports.ts b/x-pack/plugins/reporting/public/shared_imports.ts index e719d720a789..30e6cd12e3ed 100644 --- a/x-pack/plugins/reporting/public/shared_imports.ts +++ b/x-pack/plugins/reporting/public/shared_imports.ts @@ -7,7 +7,8 @@ export type { SharePluginSetup, SharePluginStart, LocatorPublic } from 'src/plugins/share/public'; -export { useRequest, UseRequestResponse } from '../../../../src/plugins/es_ui_shared/public'; +export type { UseRequestResponse } from '../../../../src/plugins/es_ui_shared/public'; +export { useRequest } from '../../../../src/plugins/es_ui_shared/public'; export { KibanaContextProvider } from '../../../../src/plugins/kibana_react/public'; diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts index c20b5e16c7f0..fa836fd47cde 100644 --- a/x-pack/plugins/reporting/server/config/index.ts +++ b/x-pack/plugins/reporting/server/config/index.ts @@ -11,7 +11,8 @@ import { get } from 'lodash'; import { ConfigSchema, ReportingConfigType } from './schema'; export { buildConfig } from './config'; export { registerUiSettings } from './ui_settings'; -export { ConfigSchema, ReportingConfigType }; +export type { ReportingConfigType }; +export { ConfigSchema }; export const config: PluginConfigDescriptor = { exposeToBrowser: { poll: true, roles: true }, diff --git a/x-pack/plugins/reporting/server/index.ts b/x-pack/plugins/reporting/server/index.ts index 19e8cb8ef198..2c851a9dffc1 100644 --- a/x-pack/plugins/reporting/server/index.ts +++ b/x-pack/plugins/reporting/server/index.ts @@ -13,7 +13,7 @@ export const plugin = (initContext: PluginInitializerContext ({ openUrl: { diff --git a/x-pack/plugins/reporting/server/lib/store/index.ts b/x-pack/plugins/reporting/server/lib/store/index.ts index 9ba8d44f19e6..e5f1c65e4794 100644 --- a/x-pack/plugins/reporting/server/lib/store/index.ts +++ b/x-pack/plugins/reporting/server/lib/store/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export { ReportDocument } from '../../../common/types'; +export type { ReportDocument } from '../../../common/types'; export { Report } from './report'; export { SavedReport } from './saved_report'; export { ReportingStore } from './store'; diff --git a/x-pack/plugins/reporting/server/lib/store/report.ts b/x-pack/plugins/reporting/server/lib/store/report.ts index 2feb162fbf37..2f802334eb6f 100644 --- a/x-pack/plugins/reporting/server/lib/store/report.ts +++ b/x-pack/plugins/reporting/server/lib/store/report.ts @@ -17,8 +17,8 @@ import { } from '../../../common/types'; import type { ReportTaskParams } from '../tasks'; -export { ReportDocument }; -export { ReportApiJSON, ReportSource }; +export type { ReportDocument }; +export type { ReportApiJSON, ReportSource }; const puid = new Puid(); export const MIGRATION_VERSION = '7.14.0'; diff --git a/x-pack/plugins/reporting/server/lib/tasks/index.ts b/x-pack/plugins/reporting/server/lib/tasks/index.ts index f464383c0b53..6be8299d1d26 100644 --- a/x-pack/plugins/reporting/server/lib/tasks/index.ts +++ b/x-pack/plugins/reporting/server/lib/tasks/index.ts @@ -14,7 +14,7 @@ export const REPORTING_MONITOR_TYPE = 'reports:monitor'; export { ExecuteReportTask } from './execute_report'; export { MonitorReportsTask } from './monitor_reports'; -export { TaskRunResult }; +export type { TaskRunResult }; export interface ReportTaskParams { id: string; diff --git a/x-pack/plugins/reporting/server/types.ts b/x-pack/plugins/reporting/server/types.ts index 84fa6fb5b10d..af9a973b0bb4 100644 --- a/x-pack/plugins/reporting/server/types.ts +++ b/x-pack/plugins/reporting/server/types.ts @@ -57,7 +57,7 @@ export type ReportingUser = { username: AuthenticatedUser['username'] } | false; export type CaptureConfig = ReportingConfigType['capture']; export type ScrollConfig = ReportingConfigType['csv']['scroll']; -export { BaseParams, BasePayload }; +export type { BaseParams, BasePayload }; // default fn type for CreateJobFnFactory export type CreateJobFn = ( diff --git a/x-pack/plugins/rule_registry/server/index.ts b/x-pack/plugins/rule_registry/server/index.ts index 8e7b514f0e53..d52cd0ebf608 100644 --- a/x-pack/plugins/rule_registry/server/index.ts +++ b/x-pack/plugins/rule_registry/server/index.ts @@ -12,9 +12,9 @@ import { PluginInitializerContext } from 'src/core/server'; import { RuleRegistryPlugin } from './plugin'; export type { RuleRegistryPluginSetupContract, RuleRegistryPluginStartContract } from './plugin'; -export { IRuleDataService, RuleDataPluginService } from './rule_data_plugin_service'; +export type { IRuleDataService, RuleDataPluginService } from './rule_data_plugin_service'; export { RuleDataClient } from './rule_data_client'; -export { IRuleDataClient } from './rule_data_client/types'; +export type { IRuleDataClient } from './rule_data_client/types'; export type { RacRequestHandlerContext, RacApiRequestHandlerContext, @@ -27,12 +27,12 @@ export * from './rule_data_client'; export * from './alert_data_client/audit_events'; export { createLifecycleRuleTypeFactory } from './utils/create_lifecycle_rule_type_factory'; -export { +export type { LifecycleRuleExecutor, LifecycleAlertService, LifecycleAlertServices, - createLifecycleExecutor, } from './utils/create_lifecycle_executor'; +export { createLifecycleExecutor } from './utils/create_lifecycle_executor'; export { createPersistenceRuleTypeWrapper } from './utils/create_persistence_rule_type_wrapper'; export * from './utils/persistence_types'; export type { AlertsClient } from './alert_data_client/alerts_client'; diff --git a/x-pack/plugins/runtime_fields/public/components/index.ts b/x-pack/plugins/runtime_fields/public/components/index.ts index 8fbec39b4abf..47db4087dab6 100644 --- a/x-pack/plugins/runtime_fields/public/components/index.ts +++ b/x-pack/plugins/runtime_fields/public/components/index.ts @@ -5,11 +5,10 @@ * 2.0. */ -export { RuntimeFieldForm, FormState as RuntimeFieldFormState } from './runtime_field_form'; +export type { FormState as RuntimeFieldFormState } from './runtime_field_form'; +export { RuntimeFieldForm } from './runtime_field_form'; export { RuntimeFieldEditor } from './runtime_field_editor'; -export { - RuntimeFieldEditorFlyoutContent, - RuntimeFieldEditorFlyoutContentProps, -} from './runtime_field_editor_flyout_content'; +export type { RuntimeFieldEditorFlyoutContentProps } from './runtime_field_editor_flyout_content'; +export { RuntimeFieldEditorFlyoutContent } from './runtime_field_editor_flyout_content'; diff --git a/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts index 7ac0165fc9d4..e626cdb5b231 100644 --- a/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts +++ b/x-pack/plugins/runtime_fields/public/components/runtime_field_editor_flyout_content/index.ts @@ -5,7 +5,5 @@ * 2.0. */ -export { - RuntimeFieldEditorFlyoutContent, - Props as RuntimeFieldEditorFlyoutContentProps, -} from './runtime_field_editor_flyout_content'; +export type { Props as RuntimeFieldEditorFlyoutContentProps } from './runtime_field_editor_flyout_content'; +export { RuntimeFieldEditorFlyoutContent } from './runtime_field_editor_flyout_content'; diff --git a/x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts index bc8d6d8bdc1b..a8f29539c4f2 100644 --- a/x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts +++ b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { RuntimeFieldForm, FormState } from './runtime_field_form'; +export type { FormState } from './runtime_field_form'; +export { RuntimeFieldForm } from './runtime_field_form'; diff --git a/x-pack/plugins/runtime_fields/public/index.ts b/x-pack/plugins/runtime_fields/public/index.ts index 1a3c6943c3a5..ece935d0d557 100644 --- a/x-pack/plugins/runtime_fields/public/index.ts +++ b/x-pack/plugins/runtime_fields/public/index.ts @@ -7,14 +7,10 @@ import { RuntimeFieldsPlugin } from './plugin'; -export { - RuntimeFieldEditorFlyoutContent, - RuntimeFieldEditorFlyoutContentProps, - RuntimeFieldEditor, - RuntimeFieldFormState, -} from './components'; +export type { RuntimeFieldEditorFlyoutContentProps, RuntimeFieldFormState } from './components'; +export { RuntimeFieldEditorFlyoutContent, RuntimeFieldEditor } from './components'; export { RUNTIME_FIELD_OPTIONS } from './constants'; -export { RuntimeField, RuntimeType, PluginSetup as RuntimeFieldsSetup } from './types'; +export type { RuntimeField, RuntimeType, PluginSetup as RuntimeFieldsSetup } from './types'; export function plugin() { return new RuntimeFieldsPlugin(); diff --git a/x-pack/plugins/runtime_fields/public/shared_imports.ts b/x-pack/plugins/runtime_fields/public/shared_imports.ts index a6dd23440176..61b517a4e111 100644 --- a/x-pack/plugins/runtime_fields/public/shared_imports.ts +++ b/x-pack/plugins/runtime_fields/public/shared_imports.ts @@ -5,15 +5,17 @@ * 2.0. */ +export type { + FormSchema, + FormHook, + ValidationFunc, + FieldConfig, +} from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; export { useForm, useFormData, Form, - FormSchema, UseField, - FormHook, - ValidationFunc, - FieldConfig, } from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; export { fieldValidators } from '../../../../src/plugins/es_ui_shared/static/forms/helpers'; diff --git a/x-pack/plugins/runtime_fields/public/test_utils.ts b/x-pack/plugins/runtime_fields/public/test_utils.ts index d3b02257c2ff..1c052cd666e5 100644 --- a/x-pack/plugins/runtime_fields/public/test_utils.ts +++ b/x-pack/plugins/runtime_fields/public/test_utils.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { registerTestBed, TestBed } from '@kbn/test/jest'; +export type { TestBed } from '@kbn/test/jest'; +export { registerTestBed } from '@kbn/test/jest'; diff --git a/x-pack/plugins/saved_objects_tagging/common/index.ts b/x-pack/plugins/saved_objects_tagging/common/index.ts index 500e656014e9..a513822adb5e 100644 --- a/x-pack/plugins/saved_objects_tagging/common/index.ts +++ b/x-pack/plugins/saved_objects_tagging/common/index.ts @@ -5,11 +5,12 @@ * 2.0. */ -export { TagsCapabilities, getTagsCapabilities } from './capabilities'; +export type { TagsCapabilities } from './capabilities'; +export { getTagsCapabilities } from './capabilities'; export { tagFeatureId, tagSavedObjectTypeName, tagManagementSectionId } from './constants'; -export { TagWithRelations, TagAttributes, Tag, ITagsClient, TagSavedObject } from './types'; +export type { TagWithRelations, TagAttributes, Tag, ITagsClient, TagSavedObject } from './types'; +export type { TagValidation } from './validation'; export { - TagValidation, validateTagColor, validateTagName, validateTagDescription, diff --git a/x-pack/plugins/saved_objects_tagging/public/components/assign_flyout/index.ts b/x-pack/plugins/saved_objects_tagging/public/components/assign_flyout/index.ts index 2dc3449199cf..d785d241edb6 100644 --- a/x-pack/plugins/saved_objects_tagging/public/components/assign_flyout/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/components/assign_flyout/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export { - getAssignFlyoutOpener, +export type { AssignFlyoutOpener, GetAssignFlyoutOpenerOptions, OpenAssignFlyoutOptions, } from './open_assign_flyout'; +export { getAssignFlyoutOpener } from './open_assign_flyout'; diff --git a/x-pack/plugins/saved_objects_tagging/public/components/base/index.ts b/x-pack/plugins/saved_objects_tagging/public/components/base/index.ts index 34500b978df0..29c75be50a39 100644 --- a/x-pack/plugins/saved_objects_tagging/public/components/base/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/components/base/index.ts @@ -5,7 +5,11 @@ * 2.0. */ -export { TagBadge, TagBadgeProps } from './tag_badge'; -export { TagList, TagListProps } from './tag_list'; -export { TagSelector, TagSelectorProps } from './tag_selector'; -export { TagSearchBarOption, TagSearchBarOptionProps } from './tag_searchbar_option'; +export type { TagBadgeProps } from './tag_badge'; +export { TagBadge } from './tag_badge'; +export type { TagListProps } from './tag_list'; +export { TagList } from './tag_list'; +export type { TagSelectorProps } from './tag_selector'; +export { TagSelector } from './tag_selector'; +export type { TagSearchBarOptionProps } from './tag_searchbar_option'; +export { TagSearchBarOption } from './tag_searchbar_option'; diff --git a/x-pack/plugins/saved_objects_tagging/public/components/edition_modal/index.ts b/x-pack/plugins/saved_objects_tagging/public/components/edition_modal/index.ts index 0436e8c57e59..ac6994453443 100644 --- a/x-pack/plugins/saved_objects_tagging/public/components/edition_modal/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/components/edition_modal/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { getCreateModalOpener, getEditModalOpener, CreateModalOpener } from './open_modal'; +export type { CreateModalOpener } from './open_modal'; +export { getCreateModalOpener, getEditModalOpener } from './open_modal'; diff --git a/x-pack/plugins/saved_objects_tagging/public/components/index.ts b/x-pack/plugins/saved_objects_tagging/public/components/index.ts index c6142d8552bc..5c7c491df9bd 100644 --- a/x-pack/plugins/saved_objects_tagging/public/components/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/components/index.ts @@ -5,13 +5,10 @@ * 2.0. */ -export { - TagSelector, +export type { TagSelectorProps, - TagList, TagListProps, - TagBadge, TagBadgeProps, - TagSearchBarOption, TagSearchBarOptionProps, } from './base'; +export { TagSelector, TagList, TagBadge, TagSearchBarOption } from './base'; diff --git a/x-pack/plugins/saved_objects_tagging/public/index.ts b/x-pack/plugins/saved_objects_tagging/public/index.ts index c110e629f0ca..1da147f4f168 100644 --- a/x-pack/plugins/saved_objects_tagging/public/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/index.ts @@ -8,8 +8,8 @@ import { PluginInitializerContext } from '../../../../src/core/public'; import { SavedObjectTaggingPlugin } from './plugin'; -export { SavedObjectTaggingPluginStart } from './types'; -export { Tag } from '../common'; +export type { SavedObjectTaggingPluginStart } from './types'; +export type { Tag } from '../common'; export const plugin = (initializerContext: PluginInitializerContext) => new SavedObjectTaggingPlugin(initializerContext); diff --git a/x-pack/plugins/saved_objects_tagging/public/management/actions/index.ts b/x-pack/plugins/saved_objects_tagging/public/management/actions/index.ts index a18ef5afd445..5503cec4af9d 100644 --- a/x-pack/plugins/saved_objects_tagging/public/management/actions/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/management/actions/index.ts @@ -14,7 +14,7 @@ import { getDeleteAction } from './delete'; import { getEditAction } from './edit'; import { getAssignAction } from './assign'; -export { TagAction } from './types'; +export type { TagAction } from './types'; interface GetActionsOptions { core: CoreStart; diff --git a/x-pack/plugins/saved_objects_tagging/public/services/assignments/index.ts b/x-pack/plugins/saved_objects_tagging/public/services/assignments/index.ts index 8b26da9cc567..763c70a93ab4 100644 --- a/x-pack/plugins/saved_objects_tagging/public/services/assignments/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/services/assignments/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ITagAssignmentService, TagAssignmentService } from './assignment_service'; +export type { ITagAssignmentService } from './assignment_service'; +export { TagAssignmentService } from './assignment_service'; diff --git a/x-pack/plugins/saved_objects_tagging/public/services/index.ts b/x-pack/plugins/saved_objects_tagging/public/services/index.ts index 1909aaea5c4e..29d5ad7a7e02 100644 --- a/x-pack/plugins/saved_objects_tagging/public/services/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/services/index.ts @@ -5,13 +5,12 @@ * 2.0. */ -export { +export type { ITagInternalClient, - TagsCache, ITagsCache, - TagsClient, ITagsChangeListener, - isServerValidationError, TagServerValidationError, } from './tags'; -export { TagAssignmentService, ITagAssignmentService } from './assignments'; +export { TagsCache, TagsClient, isServerValidationError } from './tags'; +export type { ITagAssignmentService } from './assignments'; +export { TagAssignmentService } from './assignments'; diff --git a/x-pack/plugins/saved_objects_tagging/public/services/tags/index.ts b/x-pack/plugins/saved_objects_tagging/public/services/tags/index.ts index 4b4e6d6c8412..b69f7124b0c8 100644 --- a/x-pack/plugins/saved_objects_tagging/public/services/tags/index.ts +++ b/x-pack/plugins/saved_objects_tagging/public/services/tags/index.ts @@ -5,6 +5,9 @@ * 2.0. */ -export { TagsClient, ITagInternalClient } from './tags_client'; -export { TagsCache, ITagsChangeListener, ITagsCache } from './tags_cache'; -export { isServerValidationError, TagServerValidationError } from './errors'; +export type { ITagInternalClient } from './tags_client'; +export { TagsClient } from './tags_client'; +export type { ITagsChangeListener, ITagsCache } from './tags_cache'; +export { TagsCache } from './tags_cache'; +export type { TagServerValidationError } from './errors'; +export { isServerValidationError } from './errors'; diff --git a/x-pack/plugins/saved_objects_tagging/public/services/tags/tags_cache.ts b/x-pack/plugins/saved_objects_tagging/public/services/tags/tags_cache.ts index 1d8fda1e5912..15d207aca47c 100644 --- a/x-pack/plugins/saved_objects_tagging/public/services/tags/tags_cache.ts +++ b/x-pack/plugins/saved_objects_tagging/public/services/tags/tags_cache.ts @@ -11,7 +11,7 @@ import { takeUntil } from 'rxjs/operators'; import { ITagsCache } from '../../../../../../src/plugins/saved_objects_tagging_oss/public'; import { Tag, TagAttributes } from '../../../common/types'; -export { ITagsCache }; +export type { ITagsCache }; export interface ITagsChangeListener { onDelete: (id: string) => void; diff --git a/x-pack/plugins/saved_objects_tagging/server/services/assignments/index.ts b/x-pack/plugins/saved_objects_tagging/server/services/assignments/index.ts index c465f89369a1..7bf69b6c0230 100644 --- a/x-pack/plugins/saved_objects_tagging/server/services/assignments/index.ts +++ b/x-pack/plugins/saved_objects_tagging/server/services/assignments/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { AssignmentService, IAssignmentService } from './assignment_service'; +export type { IAssignmentService } from './assignment_service'; +export { AssignmentService } from './assignment_service'; export { AssignmentError } from './errors'; diff --git a/x-pack/plugins/saved_objects_tagging/server/services/index.ts b/x-pack/plugins/saved_objects_tagging/server/services/index.ts index 695d90e496f6..36c5e32b816c 100644 --- a/x-pack/plugins/saved_objects_tagging/server/services/index.ts +++ b/x-pack/plugins/saved_objects_tagging/server/services/index.ts @@ -6,4 +6,5 @@ */ export { TagsClient, savedObjectToTag, TagValidationError } from './tags'; -export { IAssignmentService, AssignmentService, AssignmentError } from './assignments'; +export type { IAssignmentService } from './assignments'; +export { AssignmentService, AssignmentError } from './assignments'; diff --git a/x-pack/plugins/searchprofiler/common/index.ts b/x-pack/plugins/searchprofiler/common/index.ts index 5b4f922231af..154846bb3daa 100644 --- a/x-pack/plugins/searchprofiler/common/index.ts +++ b/x-pack/plugins/searchprofiler/common/index.ts @@ -7,4 +7,4 @@ export { PLUGIN } from './constants'; -export { LicenseStatus } from './types'; +export type { LicenseStatus } from './types'; diff --git a/x-pack/plugins/searchprofiler/public/application/components/highlight_details_flyout/index.ts b/x-pack/plugins/searchprofiler/public/application/components/highlight_details_flyout/index.ts index a48ee9be0c0d..3e1b4c208f15 100644 --- a/x-pack/plugins/searchprofiler/public/application/components/highlight_details_flyout/index.ts +++ b/x-pack/plugins/searchprofiler/public/application/components/highlight_details_flyout/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { HighlightDetailsFlyout, Props } from './highlight_details_flyout'; +export type { Props } from './highlight_details_flyout'; +export { HighlightDetailsFlyout } from './highlight_details_flyout'; diff --git a/x-pack/plugins/searchprofiler/public/application/components/index.ts b/x-pack/plugins/searchprofiler/public/application/components/index.ts index 86f7e2b6af55..ea5ba226fc5f 100644 --- a/x-pack/plugins/searchprofiler/public/application/components/index.ts +++ b/x-pack/plugins/searchprofiler/public/application/components/index.ts @@ -7,7 +7,8 @@ export { SearchProfilerTabs } from './searchprofiler_tabs'; export { LicenseWarningNotice } from './license_warning_notice'; -export { ProfileTree, OnHighlightChangeArgs } from './profile_tree'; +export type { OnHighlightChangeArgs } from './profile_tree'; +export { ProfileTree } from './profile_tree'; export { HighlightDetailsFlyout } from './highlight_details_flyout'; export { ProfileLoadingPlaceholder } from './profile_loading_placeholder'; export { EmptyTreePlaceHolder } from './empty_tree_placeholder'; diff --git a/x-pack/plugins/searchprofiler/public/application/components/profile_query_editor/editor/index.ts b/x-pack/plugins/searchprofiler/public/application/components/profile_query_editor/editor/index.ts index 3d90bf267052..5d8be4804117 100644 --- a/x-pack/plugins/searchprofiler/public/application/components/profile_query_editor/editor/index.ts +++ b/x-pack/plugins/searchprofiler/public/application/components/profile_query_editor/editor/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { Editor, EditorInstance } from './editor'; +export type { EditorInstance } from './editor'; +export { Editor } from './editor'; diff --git a/x-pack/plugins/searchprofiler/public/application/components/profile_tree/index.ts b/x-pack/plugins/searchprofiler/public/application/components/profile_tree/index.ts index eb1eb29d7d09..8768c5b8b85f 100644 --- a/x-pack/plugins/searchprofiler/public/application/components/profile_tree/index.ts +++ b/x-pack/plugins/searchprofiler/public/application/components/profile_tree/index.ts @@ -6,4 +6,4 @@ */ export { ProfileTree } from './profile_tree'; -export { OnHighlightChangeArgs } from './highlight_context'; +export type { OnHighlightChangeArgs } from './highlight_context'; diff --git a/x-pack/plugins/searchprofiler/public/application/store/index.ts b/x-pack/plugins/searchprofiler/public/application/store/index.ts index ce5a6fe832b8..ed350a47181d 100644 --- a/x-pack/plugins/searchprofiler/public/application/store/index.ts +++ b/x-pack/plugins/searchprofiler/public/application/store/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { useStore, State } from './store'; -export { Action } from './reducer'; +export type { State } from './store'; +export { useStore } from './store'; +export type { Action } from './reducer'; diff --git a/x-pack/plugins/security/common/licensing/index.ts b/x-pack/plugins/security/common/licensing/index.ts index ec82007524fa..48329aeb9992 100644 --- a/x-pack/plugins/security/common/licensing/index.ts +++ b/x-pack/plugins/security/common/licensing/index.ts @@ -5,6 +5,7 @@ * 2.0. */ -export { SecurityLicenseService, SecurityLicense } from './license_service'; +export type { SecurityLicense } from './license_service'; +export { SecurityLicenseService } from './license_service'; -export { LoginLayout, SecurityLicenseFeatures } from './license_features'; +export type { LoginLayout, SecurityLicenseFeatures } from './license_features'; diff --git a/x-pack/plugins/security/common/model/index.ts b/x-pack/plugins/security/common/model/index.ts index 082e6bdc12cd..bc1666af3200 100644 --- a/x-pack/plugins/security/common/model/index.ts +++ b/x-pack/plugins/security/common/model/index.ts @@ -5,17 +5,18 @@ * 2.0. */ -export { ApiKey, ApiKeyToInvalidate, ApiKeyRoleDescriptors } from './api_key'; -export { User, EditUser, getUserDisplayName } from './user'; -export { AuthenticatedUser, canUserChangePassword } from './authenticated_user'; -export { AuthenticationProvider, shouldProviderUseLoginForm } from './authentication_provider'; -export { BuiltinESPrivileges } from './builtin_es_privileges'; -export { RawKibanaPrivileges, RawKibanaFeaturePrivileges } from './raw_kibana_privileges'; -export { FeaturesPrivileges } from './features_privileges'; +export type { ApiKey, ApiKeyToInvalidate, ApiKeyRoleDescriptors } from './api_key'; +export type { User, EditUser } from './user'; +export { getUserDisplayName } from './user'; +export type { AuthenticatedUser } from './authenticated_user'; +export { canUserChangePassword } from './authenticated_user'; +export type { AuthenticationProvider } from './authentication_provider'; +export { shouldProviderUseLoginForm } from './authentication_provider'; +export type { BuiltinESPrivileges } from './builtin_es_privileges'; +export type { RawKibanaPrivileges, RawKibanaFeaturePrivileges } from './raw_kibana_privileges'; +export type { FeaturesPrivileges } from './features_privileges'; +export type { Role, RoleIndexPrivilege, RoleKibanaPrivilege } from './role'; export { - Role, - RoleIndexPrivilege, - RoleKibanaPrivilege, copyRole, isRoleDeprecated, isRoleReadOnly, @@ -26,14 +27,14 @@ export { prepareRoleClone, getExtendedRoleDeprecationNotice, } from './role'; -export { +export type { InlineRoleTemplate, StoredRoleTemplate, InvalidRoleTemplate, RoleTemplate, RoleMapping, } from './role_mapping'; -export { +export type { PrivilegeDeprecationsRolesByFeatureIdRequest, PrivilegeDeprecationsRolesByFeatureIdResponse, PrivilegeDeprecationsService, diff --git a/x-pack/plugins/security/public/authentication/index.ts b/x-pack/plugins/security/public/authentication/index.ts index 50d6b0c74376..dd7cb006d879 100644 --- a/x-pack/plugins/security/public/authentication/index.ts +++ b/x-pack/plugins/security/public/authentication/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -export { - AuthenticationService, +export type { AuthenticationServiceSetup, AuthenticationServiceStart, } from './authentication_service'; +export { AuthenticationService } from './authentication_service'; diff --git a/x-pack/plugins/security/public/index.ts b/x-pack/plugins/security/public/index.ts index e8d5f739821e..55925e142ff2 100644 --- a/x-pack/plugins/security/public/index.ts +++ b/x-pack/plugins/security/public/index.ts @@ -7,15 +7,20 @@ import type { PluginInitializer, PluginInitializerContext } from 'src/core/public'; -import type { PluginSetupDependencies, PluginStartDependencies } from './plugin'; -import { SecurityPlugin, SecurityPluginSetup, SecurityPluginStart } from './plugin'; +import type { + PluginSetupDependencies, + PluginStartDependencies, + SecurityPluginSetup, + SecurityPluginStart, +} from './plugin'; +import { SecurityPlugin } from './plugin'; -export { SecurityPluginSetup, SecurityPluginStart }; -export { AuthenticatedUser } from '../common/model'; -export { SecurityLicense, SecurityLicenseFeatures } from '../common/licensing'; -export { UserMenuLink, SecurityNavControlServiceStart } from '../public/nav_control'; +export type { SecurityPluginSetup, SecurityPluginStart }; +export type { AuthenticatedUser } from '../common/model'; +export type { SecurityLicense, SecurityLicenseFeatures } from '../common/licensing'; +export type { UserMenuLink, SecurityNavControlServiceStart } from '../public/nav_control'; -export { AuthenticationServiceStart, AuthenticationServiceSetup } from './authentication'; +export type { AuthenticationServiceStart, AuthenticationServiceSetup } from './authentication'; export const plugin: PluginInitializer< SecurityPluginSetup, diff --git a/x-pack/plugins/security/public/management/api_keys/api_keys_grid/invalidate_provider/index.ts b/x-pack/plugins/security/public/management/api_keys/api_keys_grid/invalidate_provider/index.ts index dc99861ce0a8..3af1e9d37c17 100644 --- a/x-pack/plugins/security/public/management/api_keys/api_keys_grid/invalidate_provider/index.ts +++ b/x-pack/plugins/security/public/management/api_keys/api_keys_grid/invalidate_provider/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { InvalidateProvider, InvalidateApiKeys } from './invalidate_provider'; +export type { InvalidateApiKeys } from './invalidate_provider'; +export { InvalidateProvider } from './invalidate_provider'; diff --git a/x-pack/plugins/security/public/management/role_mappings/model/index.ts b/x-pack/plugins/security/public/management/role_mappings/model/index.ts index 25e66bda3503..d80eb4d7d694 100644 --- a/x-pack/plugins/security/public/management/role_mappings/model/index.ts +++ b/x-pack/plugins/security/public/management/role_mappings/model/index.ts @@ -11,6 +11,7 @@ export { Rule } from './rule'; export { RuleGroup } from './rule_group'; export { ExceptAllRule } from './except_all_rule'; export { ExceptAnyRule } from './except_any_rule'; -export { FieldRule, FieldRuleValue } from './field_rule'; +export type { FieldRuleValue } from './field_rule'; +export { FieldRule } from './field_rule'; export { generateRulesFromRaw } from './rule_builder'; export { RuleBuilderError } from './rule_builder_error'; diff --git a/x-pack/plugins/security/public/nav_control/index.ts b/x-pack/plugins/security/public/nav_control/index.ts index 5ec306fa9717..95331b750407 100644 --- a/x-pack/plugins/security/public/nav_control/index.ts +++ b/x-pack/plugins/security/public/nav_control/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { SecurityNavControlService, SecurityNavControlServiceStart } from './nav_control_service'; +export type { SecurityNavControlServiceStart } from './nav_control_service'; +export { SecurityNavControlService } from './nav_control_service'; export type { UserMenuLink } from './nav_control_component'; diff --git a/x-pack/plugins/security/server/anonymous_access/index.ts b/x-pack/plugins/security/server/anonymous_access/index.ts index 2d86cb3a3e3b..6e41ab1bae78 100644 --- a/x-pack/plugins/security/server/anonymous_access/index.ts +++ b/x-pack/plugins/security/server/anonymous_access/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { AnonymousAccessService, AnonymousAccessServiceStart } from './anonymous_access_service'; +export type { AnonymousAccessServiceStart } from './anonymous_access_service'; +export { AnonymousAccessService } from './anonymous_access_service'; diff --git a/x-pack/plugins/security/server/audit/index.ts b/x-pack/plugins/security/server/audit/index.ts index 5cae122c94cc..b859e773552a 100644 --- a/x-pack/plugins/security/server/audit/index.ts +++ b/x-pack/plugins/security/server/audit/index.ts @@ -5,9 +5,10 @@ * 2.0. */ -export { AuditService, AuditServiceSetup, AuditLogger } from './audit_service'; +export type { AuditServiceSetup, AuditLogger } from './audit_service'; +export { AuditService } from './audit_service'; +export type { AuditEvent } from './audit_events'; export { - AuditEvent, userLoginEvent, accessAgreementAcknowledgedEvent, httpRequestEvent, diff --git a/x-pack/plugins/security/server/authentication/api_keys/index.ts b/x-pack/plugins/security/server/authentication/api_keys/index.ts index b14d09d55970..44fe48f04deb 100644 --- a/x-pack/plugins/security/server/authentication/api_keys/index.ts +++ b/x-pack/plugins/security/server/authentication/api_keys/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -export { - APIKeys, +export type { CreateAPIKeyResult, InvalidateAPIKeyResult, CreateAPIKeyParams, InvalidateAPIKeysParams, GrantAPIKeyResult, } from './api_keys'; +export { APIKeys } from './api_keys'; diff --git a/x-pack/plugins/security/server/authentication/index.ts b/x-pack/plugins/security/server/authentication/index.ts index 1e46d2aaf560..f6f6f1da3695 100644 --- a/x-pack/plugins/security/server/authentication/index.ts +++ b/x-pack/plugins/security/server/authentication/index.ts @@ -6,11 +6,11 @@ */ export { canRedirectRequest } from './can_redirect_request'; -export { - AuthenticationService, +export type { AuthenticationServiceStart, InternalAuthenticationServiceStart, } from './authentication_service'; +export { AuthenticationService } from './authentication_service'; export { AuthenticationResult } from './authentication_result'; export { DeauthenticationResult } from './deauthentication_result'; export { diff --git a/x-pack/plugins/security/server/authentication/providers/index.ts b/x-pack/plugins/security/server/authentication/providers/index.ts index c589371331ea..31f89889b389 100644 --- a/x-pack/plugins/security/server/authentication/providers/index.ts +++ b/x-pack/plugins/security/server/authentication/providers/index.ts @@ -5,11 +5,8 @@ * 2.0. */ -export { - BaseAuthenticationProvider, - AuthenticationProviderOptions, - AuthenticationProviderSpecificOptions, -} from './base'; +export type { AuthenticationProviderOptions, AuthenticationProviderSpecificOptions } from './base'; +export { BaseAuthenticationProvider } from './base'; export { AnonymousAuthenticationProvider } from './anonymous'; export { BasicAuthenticationProvider } from './basic'; export { KerberosAuthenticationProvider } from './kerberos'; diff --git a/x-pack/plugins/security/server/authorization/authorization_service.tsx b/x-pack/plugins/security/server/authorization/authorization_service.tsx index 72f2c9843dae..004c82d2c3f3 100644 --- a/x-pack/plugins/security/server/authorization/authorization_service.tsx +++ b/x-pack/plugins/security/server/authorization/authorization_service.tsx @@ -50,7 +50,7 @@ import { validateFeaturePrivileges } from './validate_feature_privileges'; import { validateReservedPrivileges } from './validate_reserved_privileges'; export { Actions } from './actions'; -export { CheckSavedObjectsPrivileges } from './check_saved_objects_privileges'; +export type { CheckSavedObjectsPrivileges } from './check_saved_objects_privileges'; interface AuthorizationServiceSetupParams { packageVersion: string; diff --git a/x-pack/plugins/security/server/authorization/index.ts b/x-pack/plugins/security/server/authorization/index.ts index 221baa85a65f..265ec2dce5a3 100644 --- a/x-pack/plugins/security/server/authorization/index.ts +++ b/x-pack/plugins/security/server/authorization/index.ts @@ -6,11 +6,12 @@ */ export { Actions } from './actions'; -export { - AuthorizationService, +export type { AuthorizationServiceSetup, AuthorizationServiceSetupInternal, } from './authorization_service'; -export { CheckSavedObjectsPrivileges } from './check_saved_objects_privileges'; -export { CheckPrivilegesPayload } from './types'; -export { transformElasticsearchRoleToRole, ElasticsearchRole } from './roles'; +export { AuthorizationService } from './authorization_service'; +export type { CheckSavedObjectsPrivileges } from './check_saved_objects_privileges'; +export type { CheckPrivilegesPayload } from './types'; +export type { ElasticsearchRole } from './roles'; +export { transformElasticsearchRoleToRole } from './roles'; diff --git a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/index.ts b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/index.ts index 81d133905230..d46f30ef53ab 100644 --- a/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/index.ts +++ b/x-pack/plugins/security/server/authorization/privileges/feature_privilege_builder/index.ts @@ -14,13 +14,13 @@ import { FeaturePrivilegeApiBuilder } from './api'; import { FeaturePrivilegeAppBuilder } from './app'; import { FeaturePrivilegeCasesBuilder } from './cases'; import { FeaturePrivilegeCatalogueBuilder } from './catalogue'; -import { FeaturePrivilegeBuilder } from './feature_privilege_builder'; +import type { FeaturePrivilegeBuilder } from './feature_privilege_builder'; import { FeaturePrivilegeManagementBuilder } from './management'; import { FeaturePrivilegeNavlinkBuilder } from './navlink'; import { FeaturePrivilegeSavedObjectBuilder } from './saved_object'; import { FeaturePrivilegeUIBuilder } from './ui'; -export { FeaturePrivilegeBuilder }; +export type { FeaturePrivilegeBuilder }; export const featurePrivilegeBuilderFactory = (actions: Actions): FeaturePrivilegeBuilder => { const builders = [ diff --git a/x-pack/plugins/security/server/authorization/privileges/index.ts b/x-pack/plugins/security/server/authorization/privileges/index.ts index 31c9cf2713c9..7e98730abd71 100644 --- a/x-pack/plugins/security/server/authorization/privileges/index.ts +++ b/x-pack/plugins/security/server/authorization/privileges/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { privilegesFactory, PrivilegesService } from './privileges'; +export type { PrivilegesService } from './privileges'; +export { privilegesFactory } from './privileges'; diff --git a/x-pack/plugins/security/server/authorization/roles/index.ts b/x-pack/plugins/security/server/authorization/roles/index.ts index a5047a1872c0..205c339b45fb 100644 --- a/x-pack/plugins/security/server/authorization/roles/index.ts +++ b/x-pack/plugins/security/server/authorization/roles/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { transformElasticsearchRoleToRole, ElasticsearchRole } from './elasticsearch_role'; +export type { ElasticsearchRole } from './elasticsearch_role'; +export { transformElasticsearchRoleToRole } from './elasticsearch_role'; diff --git a/x-pack/plugins/security/server/elasticsearch/index.ts b/x-pack/plugins/security/server/elasticsearch/index.ts index 1c3bdd3054dd..46acb874f7fc 100644 --- a/x-pack/plugins/security/server/elasticsearch/index.ts +++ b/x-pack/plugins/security/server/elasticsearch/index.ts @@ -8,8 +8,8 @@ import type { AuthenticatedUser } from '../../common/model'; export type AuthenticationInfo = Omit; -export { - ElasticsearchService, +export type { ElasticsearchServiceStart, OnlineStatusRetryScheduler, } from './elasticsearch_service'; +export { ElasticsearchService } from './elasticsearch_service'; diff --git a/x-pack/plugins/security/server/feature_usage/index.ts b/x-pack/plugins/security/server/feature_usage/index.ts index 81d4336ef7bb..b58dacfa97d3 100644 --- a/x-pack/plugins/security/server/feature_usage/index.ts +++ b/x-pack/plugins/security/server/feature_usage/index.ts @@ -5,7 +5,5 @@ * 2.0. */ -export { - SecurityFeatureUsageService, - SecurityFeatureUsageServiceStart, -} from './feature_usage_service'; +export type { SecurityFeatureUsageServiceStart } from './feature_usage_service'; +export { SecurityFeatureUsageService } from './feature_usage_service'; diff --git a/x-pack/plugins/security/server/index.ts b/x-pack/plugins/security/server/index.ts index d1600b52df0a..10b1e8167c14 100644 --- a/x-pack/plugins/security/server/index.ts +++ b/x-pack/plugins/security/server/index.ts @@ -29,11 +29,11 @@ export type { } from './authentication'; export type { CheckPrivilegesPayload } from './authorization'; export type AuthorizationServiceSetup = SecurityPluginStart['authz']; -export { AuditLogger, AuditEvent } from './audit'; +export type { AuditLogger, AuditEvent } from './audit'; export type { SecurityPluginSetup, SecurityPluginStart }; export type { AuthenticatedUser } from '../common/model'; export { ROUTE_TAG_CAN_REDIRECT } from './routes/tags'; -export { AuditServiceSetup } from './audit'; +export type { AuditServiceSetup } from './audit'; export const config: PluginConfigDescriptor> = { schema: ConfigSchema, diff --git a/x-pack/plugins/security/server/routes/authorization/roles/model/index.ts b/x-pack/plugins/security/server/routes/authorization/roles/model/index.ts index e090cd26dc39..cb5bb8a91152 100644 --- a/x-pack/plugins/security/server/routes/authorization/roles/model/index.ts +++ b/x-pack/plugins/security/server/routes/authorization/roles/model/index.ts @@ -5,5 +5,6 @@ * 2.0. */ -export { ElasticsearchRole, transformElasticsearchRoleToRole } from '../../../../authorization'; +export type { ElasticsearchRole } from '../../../../authorization'; +export { transformElasticsearchRoleToRole } from '../../../../authorization'; export { getPutPayloadSchema, transformPutPayloadToElasticsearchRole } from './put_payload'; diff --git a/x-pack/plugins/security/server/session_management/index.ts b/x-pack/plugins/security/server/session_management/index.ts index a9ac23ad6354..09787ed41985 100644 --- a/x-pack/plugins/security/server/session_management/index.ts +++ b/x-pack/plugins/security/server/session_management/index.ts @@ -5,8 +5,7 @@ * 2.0. */ -export { Session, SessionValue } from './session'; -export { - SessionManagementServiceStart, - SessionManagementService, -} from './session_management_service'; +export type { SessionValue } from './session'; +export { Session } from './session'; +export type { SessionManagementServiceStart } from './session_management_service'; +export { SessionManagementService } from './session_management_service'; diff --git a/x-pack/plugins/security_solution/common/field_maps/index.ts b/x-pack/plugins/security_solution/common/field_maps/index.ts index 0f19e2b3d3a9..e293dac66381 100644 --- a/x-pack/plugins/security_solution/common/field_maps/index.ts +++ b/x-pack/plugins/security_solution/common/field_maps/index.ts @@ -7,4 +7,5 @@ import { AlertsFieldMap, alertsFieldMap } from './alerts'; import { RulesFieldMap, rulesFieldMap } from './rules'; -export { AlertsFieldMap, RulesFieldMap, alertsFieldMap, rulesFieldMap }; +export type { AlertsFieldMap, RulesFieldMap }; +export { alertsFieldMap, rulesFieldMap }; diff --git a/x-pack/plugins/security_solution/public/common/containers/source/index.tsx b/x-pack/plugins/security_solution/public/common/containers/source/index.tsx index a894dbdd1dda..846d3a4b426e 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/source/index.tsx @@ -28,7 +28,7 @@ import { sourcererActions, sourcererSelectors } from '../../store/sourcerer'; import { DocValueFields } from '../../../../common/search_strategy/common'; import { useAppToasts } from '../../hooks/use_app_toasts'; -export { BrowserField, BrowserFields, DocValueFields }; +export type { BrowserField, BrowserFields, DocValueFields }; export const getAllBrowserFields = (browserFields: BrowserFields): Array> => Object.values(browserFields).reduce>>( diff --git a/x-pack/plugins/security_solution/public/common/store/routing/index.ts b/x-pack/plugins/security_solution/public/common/store/routing/index.ts index 1b13b70063f5..2ea4a93a8175 100644 --- a/x-pack/plugins/security_solution/public/common/store/routing/index.ts +++ b/x-pack/plugins/security_solution/public/common/store/routing/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { RoutingAction } from './action'; +export type { RoutingAction } from './action'; diff --git a/x-pack/plugins/security_solution/public/index.ts b/x-pack/plugins/security_solution/public/index.ts index 3d2412b326b5..5f2f6014822a 100644 --- a/x-pack/plugins/security_solution/public/index.ts +++ b/x-pack/plugins/security_solution/public/index.ts @@ -12,4 +12,5 @@ export type { TimelineModel } from './timelines/store/timeline/model'; export const plugin = (context: PluginInitializerContext): Plugin => new Plugin(context); -export { Plugin, PluginSetup }; +export type { PluginSetup }; +export { Plugin }; diff --git a/x-pack/plugins/security_solution/public/management/components/policies_selector/index.ts b/x-pack/plugins/security_solution/public/management/components/policies_selector/index.ts index 1b25a8af9d3f..7ebfcb8c9f4a 100644 --- a/x-pack/plugins/security_solution/public/management/components/policies_selector/index.ts +++ b/x-pack/plugins/security_solution/public/management/components/policies_selector/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { PoliciesSelector, PolicySelectionItem, PoliciesSelectorProps } from './policies_selector'; +export type { PolicySelectionItem, PoliciesSelectorProps } from './policies_selector'; +export { PoliciesSelector } from './policies_selector'; diff --git a/x-pack/plugins/security_solution/public/management/components/search_exceptions/index.ts b/x-pack/plugins/security_solution/public/management/components/search_exceptions/index.ts index 6a870dbb06c6..247754577668 100644 --- a/x-pack/plugins/security_solution/public/management/components/search_exceptions/index.ts +++ b/x-pack/plugins/security_solution/public/management/components/search_exceptions/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { SearchExceptions, SearchExceptionsProps } from './search_exceptions'; +export type { SearchExceptionsProps } from './search_exceptions'; +export { SearchExceptions } from './search_exceptions'; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx index 70f5bca339c8..ac361ff8f16a 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/index.tsx @@ -25,4 +25,4 @@ export const EndpointsContainer = memo(() => { EndpointsContainer.displayName = 'EndpointsContainer'; export { endpointListFleetApisHttpMock } from './mocks'; -export { EndpointListFleetApisHttpMockInterface } from './mocks'; +export type { EndpointListFleetApisHttpMockInterface } from './mocks'; diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts index bc9e42ddf7f5..c771cef28e73 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/policy_details/index.ts @@ -20,4 +20,4 @@ export interface EndpointPolicyDetailsStatePluginState { export interface EndpointPolicyDetailsStatePluginReducer { policyDetails: ImmutableReducer; } -export { PolicyDetailsAction } from './action'; +export type { PolicyDetailsAction } from './action'; diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/index.ts b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/index.ts index c017e7dec524..44f378b15fa0 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/index.ts +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/logical_condition/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { LogicalConditionBuilder, LogicalConditionBuilderProps } from './logical_condition_builder'; +export type { LogicalConditionBuilderProps } from './logical_condition_builder'; +export { LogicalConditionBuilder } from './logical_condition_builder'; diff --git a/x-pack/plugins/security_solution/public/overview/components/link_panel/index.ts b/x-pack/plugins/security_solution/public/overview/components/link_panel/index.ts index 64c8d6a38efe..9d404abcf222 100644 --- a/x-pack/plugins/security_solution/public/overview/components/link_panel/index.ts +++ b/x-pack/plugins/security_solution/public/overview/components/link_panel/index.ts @@ -8,4 +8,4 @@ export { InnerLinkPanel } from './inner_link_panel'; export { isLinkPanelListItem } from './helpers'; export { LinkPanel } from './link_panel'; -export { LinkPanelListItem } from './types'; +export type { LinkPanelListItem } from './types'; diff --git a/x-pack/plugins/security_solution/public/resolver/store/camera/index.ts b/x-pack/plugins/security_solution/public/resolver/store/camera/index.ts index f900ab92a58b..e42906ec2029 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/camera/index.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/camera/index.ts @@ -20,4 +20,4 @@ * would not be in the camera's viewport would be ignored. */ export { cameraReducer } from './reducer'; -export { CameraAction } from './action'; +export type { CameraAction } from './action'; diff --git a/x-pack/plugins/security_solution/public/shared_imports.ts b/x-pack/plugins/security_solution/public/shared_imports.ts index dda4179cd853..8934ad9dab4c 100644 --- a/x-pack/plugins/security_solution/public/shared_imports.ts +++ b/x-pack/plugins/security_solution/public/shared_imports.ts @@ -5,28 +5,30 @@ * 2.0. */ +export type { + FieldHook, + FieldValidateResponse, + FormData, + FormHook, + FormSchema, + ValidationError, + ValidationFunc, +} from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; export { getUseField, getFieldValidityAndErrorMessage, - FieldHook, - FieldValidateResponse, FIELD_TYPES, Form, - FormData, FormDataProvider, - FormHook, - FormSchema, UseField, UseMultiFields, useForm, useFormContext, useFormData, - ValidationError, - ValidationFunc, VALIDATION_TYPES, } from '../../../../src/plugins/es_ui_shared/static/forms/hook_form_lib'; export { Field, SelectField } from '../../../../src/plugins/es_ui_shared/static/forms/components'; export { fieldValidators } from '../../../../src/plugins/es_ui_shared/static/forms/helpers'; -export { ERROR_CODE } from '../../../../src/plugins/es_ui_shared/static/forms/helpers/field_validators/types'; +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/timelines/components/timeline/cell_rendering/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/index.tsx index 2848a850a522..5d66e399ece6 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/cell_rendering/index.tsx @@ -5,4 +5,4 @@ * 2.0. */ -export { CellValueElementProps } from '../../../../../common/types/timeline'; +export type { CellValueElementProps } from '../../../../../common/types/timeline'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts index ca7c3596d13b..c90d04e1e640 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/events.ts @@ -7,7 +7,7 @@ import { ColumnId } from './body/column_id'; import { DataProvider, QueryOperator } from './data_providers/data_provider'; -export { +export type { OnColumnSorted, OnColumnsSorted, OnColumnRemoved, diff --git a/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx b/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx index dd60656933ba..c44d1351b083 100644 --- a/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/containers/local_storage/index.tsx @@ -123,4 +123,4 @@ export const useTimelinesStorage = (): TimelinesStorage => { return { getAllTimelines, getTimelineById, addTimeline }; }; -export { TimelinesStorage }; +export type { TimelinesStorage }; diff --git a/x-pack/plugins/security_solution/server/index.ts b/x-pack/plugins/security_solution/server/index.ts index 0adcd25f5e24..16a4992e6869 100644 --- a/x-pack/plugins/security_solution/server/index.ts +++ b/x-pack/plugins/security_solution/server/index.ts @@ -45,7 +45,8 @@ export const config: PluginConfigDescriptor = { ], }; -export { ConfigType, Plugin, PluginSetup, PluginStart }; +export type { ConfigType, PluginSetup, PluginStart }; +export { Plugin }; export { AppClient }; export type { SecuritySolutionApiRequestHandlerContext } from './types'; export { EndpointError } from './endpoint/errors'; diff --git a/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts b/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts index f8d767a371d9..b93e76c09282 100644 --- a/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts +++ b/x-pack/plugins/security_solution/server/lib/machine_learning/index.ts @@ -11,7 +11,7 @@ import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-t import { buildExceptionFilter } from '@kbn/securitysolution-list-utils'; import { AnomalyRecordDoc as Anomaly } from '../../../../ml/server'; -export { Anomaly }; +export type { Anomaly }; export type AnomalyResults = estypes.SearchResponse; type MlAnomalySearch = ( searchParams: estypes.SearchRequest, diff --git a/x-pack/plugins/security_solution/server/lib/types.ts b/x-pack/plugins/security_solution/server/lib/types.ts index 2a1452e7b2fd..15f40fdbc301 100644 --- a/x-pack/plugins/security_solution/server/lib/types.ts +++ b/x-pack/plugins/security_solution/server/lib/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -export { ConfigType as Configuration } from '../config'; +export type { ConfigType as Configuration } from '../config'; import { TotalValue, BaseHit, Explanation } from '../../common/detection_engine/types'; export interface ShardsResponse { diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 2725743f76e7..453bc339fc91 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -88,7 +88,7 @@ import type { } from './plugin_contract'; import { alertsFieldMap, rulesFieldMap } from '../common/field_maps'; -export { SetupPlugins, StartPlugins, PluginSetup, PluginStart } from './plugin_contract'; +export type { SetupPlugins, StartPlugins, PluginSetup, PluginStart } from './plugin_contract'; export class Plugin implements ISecuritySolutionPlugin { private readonly pluginContext: PluginInitializerContext; diff --git a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/index.ts b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/index.ts index 231b88c39aeb..e28409871fb4 100644 --- a/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/index.ts +++ b/x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/index.ts @@ -13,7 +13,8 @@ import { setup as policyAddSetup } from './policy_add.helpers'; import { setup as policyEditSetup } from './policy_edit.helpers'; import { setup as restoreSnapshotSetup } from './restore_snapshot.helpers'; -export { nextTick, getRandomString, findTestSubject, TestBed, delay } from '@kbn/test/jest'; +export type { TestBed } from '@kbn/test/jest'; +export { nextTick, getRandomString, findTestSubject, delay } from '@kbn/test/jest'; export { setupEnvironment } from './setup_environment'; diff --git a/x-pack/plugins/snapshot_restore/public/application/components/index.ts b/x-pack/plugins/snapshot_restore/public/application/components/index.ts index 642f59d12c6f..77f53a3533a1 100644 --- a/x-pack/plugins/snapshot_restore/public/application/components/index.ts +++ b/x-pack/plugins/snapshot_restore/public/application/components/index.ts @@ -17,12 +17,8 @@ export { RestoreSnapshotForm } from './restore_snapshot_form'; export { PolicyExecuteProvider } from './policy_execute_provider'; export { PolicyDeleteProvider } from './policy_delete_provider'; export { CollapsibleIndicesList, CollapsibleDataStreamsList } from './collapsible_lists'; -export { - RetentionSettingsUpdateModalProvider, - UpdateRetentionSettings, -} from './retention_update_modal_provider'; -export { - RetentionExecuteModalProvider, - ExecuteRetention, -} from './retention_execute_modal_provider'; +export type { UpdateRetentionSettings } from './retention_update_modal_provider'; +export { RetentionSettingsUpdateModalProvider } from './retention_update_modal_provider'; +export type { ExecuteRetention } from './retention_execute_modal_provider'; +export { RetentionExecuteModalProvider } from './retention_execute_modal_provider'; export { PolicyForm } from './policy_form'; diff --git a/x-pack/plugins/snapshot_restore/public/application/index.tsx b/x-pack/plugins/snapshot_restore/public/application/index.tsx index c0b438e1761c..69b4b2dab1b3 100644 --- a/x-pack/plugins/snapshot_restore/public/application/index.tsx +++ b/x-pack/plugins/snapshot_restore/public/application/index.tsx @@ -37,4 +37,4 @@ export const renderApp = (elem: Element, dependencies: AppDependencies) => { }; }; -export { AppDependencies }; +export type { AppDependencies }; diff --git a/x-pack/plugins/snapshot_restore/public/application/lib/index.ts b/x-pack/plugins/snapshot_restore/public/application/lib/index.ts index 19a42bef4cea..1462728e756b 100644 --- a/x-pack/plugins/snapshot_restore/public/application/lib/index.ts +++ b/x-pack/plugins/snapshot_restore/public/application/lib/index.ts @@ -7,10 +7,8 @@ export { useDecodedParams } from './use_decoded_params'; +export type { SortField, SortDirection, SnapshotListParams } from './snapshot_list_params'; export { - SortField, - SortDirection, - SnapshotListParams, getListParams, getQueryFromListParams, DEFAULT_SNAPSHOT_LIST_PARAMS, diff --git a/x-pack/plugins/snapshot_restore/public/application/services/validation/index.ts b/x-pack/plugins/snapshot_restore/public/application/services/validation/index.ts index 90eca1f9fd1d..92d2e4117d06 100644 --- a/x-pack/plugins/snapshot_restore/public/application/services/validation/index.ts +++ b/x-pack/plugins/snapshot_restore/public/application/services/validation/index.ts @@ -5,12 +5,11 @@ * 2.0. */ -export { - RepositoryValidation, - RepositorySettingsValidation, - validateRepository, -} from './validate_repository'; +export type { RepositoryValidation, RepositorySettingsValidation } from './validate_repository'; +export { validateRepository } from './validate_repository'; -export { RestoreValidation, validateRestore } from './validate_restore'; +export type { RestoreValidation } from './validate_restore'; +export { validateRestore } from './validate_restore'; -export { PolicyValidation, validatePolicy, ValidatePolicyHelperData } from './validate_policy'; +export type { PolicyValidation, ValidatePolicyHelperData } from './validate_policy'; +export { validatePolicy } from './validate_policy'; diff --git a/x-pack/plugins/snapshot_restore/public/shared_imports.ts b/x-pack/plugins/snapshot_restore/public/shared_imports.ts index a3cda90d26f2..cc86117d1f84 100644 --- a/x-pack/plugins/snapshot_restore/public/shared_imports.ts +++ b/x-pack/plugins/snapshot_restore/public/shared_imports.ts @@ -5,22 +5,24 @@ * 2.0. */ +export type { + Error, + Frequency, + SendRequestConfig, + SendRequestResponse, + UseRequestResponse, + UseRequestConfig, +} from '../../../../src/plugins/es_ui_shared/public'; export { AuthorizationProvider, CronEditor, - Error, - Frequency, NotAuthorizedSection, SectionError, PageError, PageLoading, sendRequest, - SendRequestConfig, - SendRequestResponse, - UseRequestResponse, useAuthorizationContext, useRequest, - UseRequestConfig, WithPrivileges, EuiCodeEditor, } from '../../../../src/plugins/es_ui_shared/public'; diff --git a/x-pack/plugins/snapshot_restore/server/test/helpers/index.ts b/x-pack/plugins/snapshot_restore/server/test/helpers/index.ts index 475d4d9a3e17..682b520c12b0 100644 --- a/x-pack/plugins/snapshot_restore/server/test/helpers/index.ts +++ b/x-pack/plugins/snapshot_restore/server/test/helpers/index.ts @@ -5,6 +5,7 @@ * 2.0. */ -export { RouterMock, RequestMock } from './router_mock'; +export type { RequestMock } from './router_mock'; +export { RouterMock } from './router_mock'; export { routeDependencies } from './route_dependencies'; diff --git a/x-pack/plugins/spaces/common/licensing/index.ts b/x-pack/plugins/spaces/common/licensing/index.ts index f7dd998a7561..5c23f035c84c 100644 --- a/x-pack/plugins/spaces/common/licensing/index.ts +++ b/x-pack/plugins/spaces/common/licensing/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { SpacesLicenseService, SpacesLicense } from './license_service'; +export type { SpacesLicense } from './license_service'; +export { SpacesLicenseService } from './license_service'; diff --git a/x-pack/plugins/spaces/public/index.ts b/x-pack/plugins/spaces/public/index.ts index fe04358e3048..86f1afd234be 100644 --- a/x-pack/plugins/spaces/public/index.ts +++ b/x-pack/plugins/spaces/public/index.ts @@ -9,7 +9,7 @@ import { SpacesPlugin } from './plugin'; export { getSpaceColor, getSpaceImageUrl, getSpaceInitials } from './space_avatar'; -export { SpacesPluginSetup, SpacesPluginStart } from './plugin'; +export type { SpacesPluginSetup, SpacesPluginStart } from './plugin'; export type { Space, GetAllSpacesPurpose, GetSpaceResult } from '../common'; diff --git a/x-pack/plugins/spaces/server/index.ts b/x-pack/plugins/spaces/server/index.ts index ad2706975919..6628d75a3649 100644 --- a/x-pack/plugins/spaces/server/index.ts +++ b/x-pack/plugins/spaces/server/index.ts @@ -19,9 +19,13 @@ export { addSpaceIdToPath } from '../common'; // end public contract exports -export { SpacesPluginSetup, SpacesPluginStart } from './plugin'; -export { SpacesServiceSetup, SpacesServiceStart } from './spaces_service'; -export { ISpacesClient, SpacesClientRepositoryFactory, SpacesClientWrapper } from './spaces_client'; +export type { SpacesPluginSetup, SpacesPluginStart } from './plugin'; +export type { SpacesServiceSetup, SpacesServiceStart } from './spaces_service'; +export type { + ISpacesClient, + SpacesClientRepositoryFactory, + SpacesClientWrapper, +} from './spaces_client'; export type { Space, diff --git a/x-pack/plugins/spaces/server/lib/copy_to_spaces/index.ts b/x-pack/plugins/spaces/server/lib/copy_to_spaces/index.ts index a4283d983708..a100056c57bc 100644 --- a/x-pack/plugins/spaces/server/lib/copy_to_spaces/index.ts +++ b/x-pack/plugins/spaces/server/lib/copy_to_spaces/index.ts @@ -7,4 +7,4 @@ export { copySavedObjectsToSpacesFactory } from './copy_to_spaces'; export { resolveCopySavedObjectsToSpacesConflictsFactory } from './resolve_copy_conflicts'; -export { CopyResponse } from './types'; +export type { CopyResponse } from './types'; diff --git a/x-pack/plugins/spaces/server/spaces_client/index.ts b/x-pack/plugins/spaces/server/spaces_client/index.ts index 124d94ba07f2..b60d4fa2686f 100644 --- a/x-pack/plugins/spaces/server/spaces_client/index.ts +++ b/x-pack/plugins/spaces/server/spaces_client/index.ts @@ -5,11 +5,12 @@ * 2.0. */ -export { SpacesClient, ISpacesClient } from './spaces_client'; -export { - SpacesClientService, +export type { ISpacesClient } from './spaces_client'; +export { SpacesClient } from './spaces_client'; +export type { SpacesClientServiceSetup, SpacesClientServiceStart, SpacesClientRepositoryFactory, SpacesClientWrapper, } from './spaces_client_service'; +export { SpacesClientService } from './spaces_client_service'; diff --git a/x-pack/plugins/spaces/server/spaces_service/index.ts b/x-pack/plugins/spaces/server/spaces_service/index.ts index adb311c2048e..1fd77f742866 100644 --- a/x-pack/plugins/spaces/server/spaces_service/index.ts +++ b/x-pack/plugins/spaces/server/spaces_service/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { SpacesService, SpacesServiceSetup, SpacesServiceStart } from './spaces_service'; +export type { SpacesServiceSetup, SpacesServiceStart } from './spaces_service'; +export { SpacesService } from './spaces_service'; diff --git a/x-pack/plugins/spaces/server/usage_stats/index.ts b/x-pack/plugins/spaces/server/usage_stats/index.ts index e8cba8fb1988..d3e736e17416 100644 --- a/x-pack/plugins/spaces/server/usage_stats/index.ts +++ b/x-pack/plugins/spaces/server/usage_stats/index.ts @@ -6,5 +6,6 @@ */ export { SPACES_USAGE_STATS_TYPE } from './constants'; -export { UsageStatsService, UsageStatsServiceSetup } from './usage_stats_service'; -export { UsageStats } from './types'; +export type { UsageStatsServiceSetup } from './usage_stats_service'; +export { UsageStatsService } from './usage_stats_service'; +export type { UsageStats } from './types'; diff --git a/x-pack/plugins/stack_alerts/server/types.ts b/x-pack/plugins/stack_alerts/server/types.ts index b78aa4e6432d..a339e0b24921 100644 --- a/x-pack/plugins/stack_alerts/server/types.ts +++ b/x-pack/plugins/stack_alerts/server/types.ts @@ -8,7 +8,7 @@ import { PluginStartContract as TriggersActionsUiStartContract } from '../../triggers_actions_ui/server'; import { PluginSetupContract as AlertingSetup } from '../../alerting/server'; -export { +export type { PluginSetupContract as AlertingSetup, AlertType, RuleParamsAndRefs, diff --git a/x-pack/plugins/task_manager/server/index.ts b/x-pack/plugins/task_manager/server/index.ts index d078c7b78ad9..58fba0b6f68c 100644 --- a/x-pack/plugins/task_manager/server/index.ts +++ b/x-pack/plugins/task_manager/server/index.ts @@ -30,7 +30,7 @@ export { throwUnrecoverableError, isEphemeralTaskRejectedDueToCapacityError, } from './task_running'; -export { RunNowResult } from './task_scheduling'; +export type { RunNowResult } from './task_scheduling'; export { getOldestIdleActionTask } from './queries/oldest_idle_action_task'; export type { diff --git a/x-pack/plugins/task_manager/server/monitoring/index.ts b/x-pack/plugins/task_manager/server/monitoring/index.ts index 99a4e31dbdb0..a352ec55f2db 100644 --- a/x-pack/plugins/task_manager/server/monitoring/index.ts +++ b/x-pack/plugins/task_manager/server/monitoring/index.ts @@ -18,10 +18,9 @@ import { TaskPollingLifecycle } from '../polling_lifecycle'; import { ManagedConfiguration } from '../lib/create_managed_configuration'; import { EphemeralTaskLifecycle } from '../ephemeral_task_lifecycle'; +export type { MonitoringStats, RawMonitoringStats } from './monitoring_stats_stream'; export { - MonitoringStats, HealthStatus, - RawMonitoringStats, summarizeMonitoringStats, createAggregators, createMonitoringStatsStream, diff --git a/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.ts b/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.ts index 08badf8fe1c9..5175525b15cf 100644 --- a/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.ts +++ b/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.ts @@ -37,7 +37,7 @@ import { ManagedConfiguration } from '../lib/create_managed_configuration'; import { EphemeralTaskLifecycle } from '../ephemeral_task_lifecycle'; import { CapacityEstimationStat, withCapacityEstimate } from './capacity_estimation'; -export { AggregatedStatProvider, AggregatedStat } from './runtime_statistics_aggregator'; +export type { AggregatedStatProvider, AggregatedStat } from './runtime_statistics_aggregator'; export interface MonitoringStats { last_update: string; diff --git a/x-pack/plugins/timelines/public/components/t_grid/body/sort/index.ts b/x-pack/plugins/timelines/public/components/t_grid/body/sort/index.ts index e514e4f4e261..9e653e1b2bb8 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/body/sort/index.ts +++ b/x-pack/plugins/timelines/public/components/t_grid/body/sort/index.ts @@ -9,7 +9,7 @@ import { SortDirection } from '../../../../../common/types/timeline'; import type { SortColumnTimeline } from '../../../../../common/types/timeline'; // TODO: Cleanup this type to match SortColumnTimeline -export { SortDirection }; +export type { SortDirection }; /** Specifies which column the timeline is sorted on */ export type Sort = SortColumnTimeline; diff --git a/x-pack/plugins/timelines/public/index.ts b/x-pack/plugins/timelines/public/index.ts index 70f7185e9c48..040137a9ea54 100644 --- a/x-pack/plugins/timelines/public/index.ts +++ b/x-pack/plugins/timelines/public/index.ts @@ -26,14 +26,14 @@ export type { export { Direction } from '../common/search_strategy/common'; export { tGridReducer } from './store/t_grid/reducer'; export type { TGridModelForTimeline, TimelineState, TimelinesUIStart } from './types'; -export { TGridType, SortDirection } from './types'; +export type { TGridType, SortDirection } from './types'; +export type { OnColumnFocused } from '../common/utils/accessibility'; export { ARIA_COLINDEX_ATTRIBUTE, ARIA_ROWINDEX_ATTRIBUTE, DATA_COLINDEX_ATTRIBUTE, DATA_ROWINDEX_ATTRIBUTE, FIRST_ARIA_INDEX, - OnColumnFocused, arrayIndexToAriaIndex, elementOrChildrenHasFocus, isArrowDownOrArrowUp, diff --git a/x-pack/plugins/timelines/server/index.ts b/x-pack/plugins/timelines/server/index.ts index ef18226a0e60..e14ac343ed81 100644 --- a/x-pack/plugins/timelines/server/index.ts +++ b/x-pack/plugins/timelines/server/index.ts @@ -12,4 +12,4 @@ export function plugin(initializerContext: PluginInitializerContext) { return new TimelinesPlugin(initializerContext); } -export { TimelinesPluginUI, TimelinesPluginStart } from './types'; +export type { TimelinesPluginUI, TimelinesPluginStart } from './types'; diff --git a/x-pack/plugins/transform/common/shared_imports.ts b/x-pack/plugins/transform/common/shared_imports.ts index 42e77938d9ce..22201cf7c075 100644 --- a/x-pack/plugins/transform/common/shared_imports.ts +++ b/x-pack/plugins/transform/common/shared_imports.ts @@ -5,12 +5,12 @@ * 2.0. */ +export type { ChartData } from '../../ml/common'; export { composeValidators, isPopulatedObject, isRuntimeMappings, patternValidator, - ChartData, } from '../../ml/common'; export { RUNTIME_FIELD_TYPES } from '../../../../src/plugins/data/common'; diff --git a/x-pack/plugins/transform/public/app/common/index.ts b/x-pack/plugins/transform/public/app/common/index.ts index ccd90f875935..7081b6db2fe4 100644 --- a/x-pack/plugins/transform/public/app/common/index.ts +++ b/x-pack/plugins/transform/public/app/common/index.ts @@ -11,35 +11,46 @@ export { getPivotPreviewDevConsoleStatement, INIT_MAX_COLUMNS, } from './data_grid'; +export type { EsDoc, EsDocSource } from './fields'; export { getDefaultSelectableFields, getFlattenedFields, getSelectableFields, toggleSelectedField, - EsDoc, - EsDocSource, } from './fields'; -export { DropDownLabel, DropDownOption, Label } from './dropdown'; +export type { DropDownLabel, DropDownOption, Label } from './dropdown'; export { isTransformIdValid, refreshTransformList$, useRefreshTransformList, REFRESH_TRANSFORM_LIST_STATE, } from './transform'; -export { TRANSFORM_LIST_COLUMN, TransformListAction, TransformListRow } from './transform_list'; +export type { TransformListAction, TransformListRow } from './transform_list'; +export { TRANSFORM_LIST_COLUMN } from './transform_list'; export { getTransformProgress, isCompletedBatchTransform } from './transform_stats'; -export { - getEsAggFromAggConfig, - isPivotAggsConfigWithUiSupport, - isPivotAggsConfigPercentiles, - PERCENTILES_AGG_DEFAULT_PERCENTS, +export type { PivotAggsConfig, PivotAggsConfigDict, PivotAggsConfigBase, PivotAggsConfigWithUiSupport, PivotAggsConfigWithUiSupportDict, +} from './pivot_aggs'; +export { + getEsAggFromAggConfig, + isPivotAggsConfigWithUiSupport, + isPivotAggsConfigPercentiles, + PERCENTILES_AGG_DEFAULT_PERCENTS, pivotAggsFieldSupport, } from './pivot_aggs'; +export type { + GroupByConfigWithInterval, + GroupByConfigWithUiSupport, + PivotGroupByConfig, + PivotGroupByConfigDict, + PivotGroupByConfigWithUiSupportDict, + PivotSupportedGroupByAggs, + PivotSupportedGroupByAggsWithInterval, +} from './pivot_group_by'; export { dateHistogramIntervalFormatRegex, getEsAggFromGroupByConfig, @@ -49,15 +60,9 @@ export { isGroupByHistogram, isGroupByTerms, pivotGroupByFieldSupport, - GroupByConfigWithInterval, - GroupByConfigWithUiSupport, - PivotGroupByConfig, - PivotGroupByConfigDict, - PivotGroupByConfigWithUiSupportDict, - PivotSupportedGroupByAggs, - PivotSupportedGroupByAggsWithInterval, PIVOT_SUPPORTED_GROUP_BY_AGGS, } from './pivot_group_by'; +export type { PivotQuery, SimpleQuery } from './request'; export { defaultQuery, getPreviewTransformRequestBody, @@ -68,6 +73,4 @@ export { isMatchAllQuery, isSimpleQuery, matchAllQuery, - PivotQuery, - SimpleQuery, } from './request'; diff --git a/x-pack/plugins/transform/public/app/hooks/use_search_items/index.ts b/x-pack/plugins/transform/public/app/hooks/use_search_items/index.ts index eacfa20f3f07..14f2dde8a3fa 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_search_items/index.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_search_items/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export { SavedSearchQuery, SearchItems } from './common'; +export type { SavedSearchQuery, SearchItems } from './common'; export { useSearchItems } from './use_search_items'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/index.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/index.ts index ac1f427d6bf9..df038845bc26 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/index.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/aggregation_list/index.ts @@ -5,5 +5,7 @@ * 2.0. */ -export { AggListForm, AggListProps } from './list_form'; -export { AggListSummary, AggListSummaryProps } from './list_summary'; +export type { AggListProps } from './list_form'; +export { AggListForm } from './list_form'; +export type { AggListSummaryProps } from './list_summary'; +export { AggListSummary } from './list_summary'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/index.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/index.ts index b7461f63f2ad..c2bd23974c89 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/index.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/index.ts @@ -6,4 +6,4 @@ */ export { filterAggsFieldSupport, FILTERS } from './constants'; -export { FilterAggType } from './types'; +export type { FilterAggType } from './types'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/index.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/index.ts index 5014b8a4c80f..775401decef3 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/index.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/index.ts @@ -5,16 +5,12 @@ * 2.0. */ -export { - defaultSearch, - QUERY_LANGUAGE, - QUERY_LANGUAGE_KUERY, - QUERY_LANGUAGE_LUCENE, -} from './constants'; +export type { QUERY_LANGUAGE } from './constants'; +export { defaultSearch, QUERY_LANGUAGE_KUERY, QUERY_LANGUAGE_LUCENE } from './constants'; export { applyTransformConfigToDefineState } from './apply_transform_config_to_define_state'; export { getAggNameConflictToastMessages } from './get_agg_name_conflict_toast_messages'; export { getDefaultAggregationConfig } from './get_default_aggregation_config'; export { getDefaultGroupByConfig } from './get_default_group_by_config'; export { getDefaultStepDefineState } from './get_default_step_define_state'; export { getPivotDropdownOptions } from './get_pivot_dropdown_options'; -export { ErrorMessage, Field, StepDefineExposedState } from './types'; +export type { ErrorMessage, Field, StepDefineExposedState } from './types'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/index.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/index.ts index 3c0ce70bd099..5646e420a8ec 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/index.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/index.ts @@ -5,13 +5,13 @@ * 2.0. */ +export type { StepDefineExposedState } from './common'; export { defaultSearch, applyTransformConfigToDefineState, getDefaultStepDefineState, - StepDefineExposedState, QUERY_LANGUAGE_KUERY, } from './common'; -export { StepDefineFormHook } from './hooks/use_step_define_form'; +export type { StepDefineFormHook } from './hooks/use_step_define_form'; export { StepDefineForm } from './step_define_form'; export { StepDefineSummary } from './step_define_summary'; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/index.ts b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/index.ts index bbc4b42e1b23..6045005dd4a0 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/index.ts +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_details/index.ts @@ -5,10 +5,7 @@ * 2.0. */ -export { - applyTransformConfigToDetailsState, - getDefaultStepDetailsState, - StepDetailsExposedState, -} from './common'; +export type { StepDetailsExposedState } from './common'; +export { applyTransformConfigToDetailsState, getDefaultStepDetailsState } from './common'; export { StepDetailsForm } from './step_details_form'; export { StepDetailsSummary } from './step_details_summary'; diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/stats_bar/index.ts b/x-pack/plugins/transform/public/app/sections/transform_management/components/stats_bar/index.ts index 8d28d175943c..a656966fa833 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/stats_bar/index.ts +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/stats_bar/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { StatsBar, TransformStatsBarStats } from './stats_bar'; +export type { TransformStatsBarStats } from './stats_bar'; +export { StatsBar } from './stats_bar'; diff --git a/x-pack/plugins/transform/public/shared_imports.ts b/x-pack/plugins/transform/public/shared_imports.ts index b8f5d8820585..c8375af88a21 100644 --- a/x-pack/plugins/transform/public/shared_imports.ts +++ b/x-pack/plugins/transform/public/shared_imports.ts @@ -6,20 +6,20 @@ */ export { XJsonMode } from '@kbn/ace'; -export { UseRequestConfig, useRequest } from '../../../../src/plugins/es_ui_shared/public'; +export type { UseRequestConfig } from '../../../../src/plugins/es_ui_shared/public'; +export { useRequest } from '../../../../src/plugins/es_ui_shared/public'; export { getSavedSearch, getSavedSearchUrlConflictMessage, } from '../../../../src/plugins/discover/public'; -export { - getMlSharedImports, +export type { GetMlSharedImportsReturnType, UseIndexDataReturnType, EsSorting, RenderCellValue, - ES_CLIENT_TOTAL_HITS_RELATION, } from '../../ml/public'; +export { getMlSharedImports, ES_CLIENT_TOTAL_HITS_RELATION } from '../../ml/public'; import { XJson } from '../../../../src/plugins/es_ui_shared/public'; const { expandLiteralStrings, collapseLiteralStrings } = XJson; diff --git a/x-pack/plugins/triggers_actions_ui/public/types.ts b/x-pack/plugins/triggers_actions_ui/public/types.ts index 8085f9245f4e..0b35317cad9b 100644 --- a/x-pack/plugins/triggers_actions_ui/public/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/types.ts @@ -43,7 +43,7 @@ import { type Alert = SanitizedAlert; type ResolvedRule = ResolvedSanitizedRule; -export { +export type { Alert, AlertAction, AlertAggregations, @@ -56,13 +56,12 @@ export { AlertTypeParams, ResolvedRule, }; +export type { ActionType, AsApiContract }; export { - ActionType, AlertHistoryEsIndexConnectorId, AlertHistoryDocumentTemplate, AlertHistoryDefaultIndexName, ALERT_HISTORY_PREFIX, - AsApiContract, }; export type ActionTypeIndex = Record; diff --git a/x-pack/plugins/triggers_actions_ui/server/data/index.ts b/x-pack/plugins/triggers_actions_ui/server/data/index.ts index 7bc14d0619d7..1f6f39a57cbc 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/index.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/index.ts @@ -9,9 +9,8 @@ import { Logger, IRouter } from '../../../../../src/core/server'; import { timeSeriesQuery } from './lib/time_series_query'; import { registerRoutes } from './routes'; +export type { TimeSeriesQuery, CoreQueryParams } from './lib'; export { - TimeSeriesQuery, - CoreQueryParams, CoreQueryParamsSchemaProperties, validateCoreQueryBody, validateTimeWindowUnits, diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/index.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/index.ts index aeaee6193544..c76eb1cafa86 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/index.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -export { TimeSeriesQuery } from './time_series_query'; +export type { TimeSeriesQuery } from './time_series_query'; +export type { CoreQueryParams } from './core_query_types'; export { - CoreQueryParams, CoreQueryParamsSchemaProperties, validateCoreQueryBody, validateTimeWindowUnits, diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts index 0be981661f56..ca4c7c8acc5d 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_query.ts @@ -12,7 +12,7 @@ import { DEFAULT_GROUPS } from '../index'; import { getDateRangeInfo } from './date_range_info'; import { TimeSeriesQuery, TimeSeriesResult, TimeSeriesResultRow } from './time_series_types'; -export { TimeSeriesQuery, TimeSeriesResult } from './time_series_types'; +export type { TimeSeriesQuery, TimeSeriesResult } from './time_series_types'; export interface TimeSeriesQueryParameters { logger: Logger; diff --git a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts index f6a1950c0fd9..125bdaa487fd 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/lib/time_series_types.ts @@ -19,7 +19,7 @@ import { getDateStartAfterDateEndErrorMessage, } from './date_range_info'; -export { TimeSeriesResult, TimeSeriesResultRow, MetricResult } from '../../../common/data'; +export type { TimeSeriesResult, TimeSeriesResultRow, MetricResult } from '../../../common/data'; // The parameters here are very similar to the alert parameters. // Missing are `comparator` and `threshold`, which aren't needed to generate diff --git a/x-pack/plugins/triggers_actions_ui/server/data/routes/time_series_query.ts b/x-pack/plugins/triggers_actions_ui/server/data/routes/time_series_query.ts index da6638db2e45..8b618b3ae3d4 100644 --- a/x-pack/plugins/triggers_actions_ui/server/data/routes/time_series_query.ts +++ b/x-pack/plugins/triggers_actions_ui/server/data/routes/time_series_query.ts @@ -16,7 +16,7 @@ import { Logger } from '../../../../../../src/core/server'; import { TimeSeriesQueryParameters } from '../lib/time_series_query'; import { TimeSeriesQuery, TimeSeriesQuerySchema, TimeSeriesResult } from '../lib/time_series_types'; -export { TimeSeriesQuery, TimeSeriesResult } from '../lib/time_series_types'; +export type { TimeSeriesQuery, TimeSeriesResult } from '../lib/time_series_types'; export function createTimeSeriesQueryRoute( logger: Logger, diff --git a/x-pack/plugins/triggers_actions_ui/server/index.ts b/x-pack/plugins/triggers_actions_ui/server/index.ts index 89c17ea0d418..2f33f3bd77cc 100644 --- a/x-pack/plugins/triggers_actions_ui/server/index.ts +++ b/x-pack/plugins/triggers_actions_ui/server/index.ts @@ -8,10 +8,9 @@ import { PluginConfigDescriptor, PluginInitializerContext } from 'kibana/server' import { configSchema, ConfigSchema } from '../config'; import { TriggersActionsPlugin } from './plugin'; -export { PluginStartContract } from './plugin'; +export type { PluginStartContract } from './plugin'; +export type { TimeSeriesQuery, CoreQueryParams } from './data'; export { - TimeSeriesQuery, - CoreQueryParams, CoreQueryParamsSchemaProperties, validateCoreQueryBody, validateTimeWindowUnits, diff --git a/x-pack/plugins/ui_actions_enhanced/public/components/presentable_picker/presentable_picker.tsx b/x-pack/plugins/ui_actions_enhanced/public/components/presentable_picker/presentable_picker.tsx index 72f9e5aa0bd4..9667a78df9a4 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/components/presentable_picker/presentable_picker.tsx +++ b/x-pack/plugins/ui_actions_enhanced/public/components/presentable_picker/presentable_picker.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiFlexGroup } from '@elastic/eui'; import { PresentablePickerItem, Item } from './presentable_picker_item'; -export { Item } from './presentable_picker_item'; +export type { Item } from './presentable_picker_item'; export interface PresentablePickerProps { items: Item[]; diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/trigger_picker/index.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/trigger_picker/index.ts index cdb6fbe54698..4a30a0494e8f 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/trigger_picker/index.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/trigger_picker/index.ts @@ -5,5 +5,5 @@ * 2.0. */ -export { TriggerPickerItemDescription } from './trigger_picker_item'; +export type { TriggerPickerItemDescription } from './trigger_picker_item'; export * from './trigger_picker'; diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/types.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/types.ts index 4d6e5354604a..052211d52389 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/types.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/types.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { ActionFactoryPlaceContext } from '../types'; +export type { ActionFactoryPlaceContext } from '../types'; diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/containers/index.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/containers/index.ts index 85ee58636740..cb1e6099c9b5 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/containers/index.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/containers/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { createPublicDrilldownManager, PublicDrilldownManagerComponent } from './drilldown_manager'; +export type { PublicDrilldownManagerComponent } from './drilldown_manager'; +export { createPublicDrilldownManager } from './drilldown_manager'; diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_manager_state.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_manager_state.ts index 5a34a002bf4c..e363d154dc14 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_manager_state.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_manager_state.ts @@ -468,7 +468,6 @@ export class DrilldownManagerState { // Below are convenience React hooks for consuming observables in connected // React components. - /* eslint-disable react-hooks/rules-of-hooks */ public readonly useTitle = () => useObservable(this.title$, this.title$.getValue()); public readonly useFooter = () => useObservable(this.footer$, this.footer$.getValue()); public readonly useRoute = () => useObservable(this.route$, this.route$.getValue()); @@ -477,5 +476,4 @@ export class DrilldownManagerState { public readonly useActionFactory = () => useObservable(this.actionFactory$, this.actionFactory$.getValue()); public readonly useEvents = () => useObservable(this.events$, this.events$.getValue()); - /* eslint-enable react-hooks/rules-of-hooks */ } diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_state.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_state.ts index f80ad30d34bb..d16a9a93930d 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_state.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/state/drilldown_state.ts @@ -233,10 +233,8 @@ export class DrilldownState { // Below are convenience React hooks for consuming observables in connected // React components. - /* eslint-disable react-hooks/rules-of-hooks */ public readonly useName = () => useObservable(this.name$, this.name$.getValue()); public readonly useTriggers = () => useObservable(this.triggers$, this.triggers$.getValue()); public readonly useConfig = () => useObservable(this.config$, this.config$.getValue()); public readonly useError = () => useSyncObservable(this.error$); - /* eslint-enable react-hooks/rules-of-hooks */ } diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/url_drilldown_collect_config/index.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/url_drilldown_collect_config/index.ts index 7922158c62e7..5aa1dddd64f8 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/url_drilldown_collect_config/index.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/url_drilldown_collect_config/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { UrlDrilldownCollectConfig, UrlDrilldownCollectConfigProps } from './lazy'; +export type { UrlDrilldownCollectConfigProps } from './lazy'; +export { UrlDrilldownCollectConfig } from './lazy'; diff --git a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/index.ts b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/index.ts index cc0ce30eb4f4..db76a54cc8d5 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/index.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -export { UrlDrilldownConfig, UrlDrilldownGlobalScope, UrlDrilldownScope } from './types'; +export type { UrlDrilldownConfig, UrlDrilldownGlobalScope, UrlDrilldownScope } from './types'; export { UrlDrilldownCollectConfig } from './components'; export { validateUrlTemplate as urlDrilldownValidateUrlTemplate, diff --git a/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/types.ts b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/types.ts index b400f9bd9723..2512753c07f4 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/types.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/dynamic_actions/types.ts @@ -7,7 +7,7 @@ import { SerializedAction, SerializedEvent, BaseActionConfig } from '../../common/types'; -export { SerializedAction, SerializedEvent, BaseActionConfig }; +export type { SerializedAction, SerializedEvent, BaseActionConfig }; /** * Action factory context passed into ActionFactories' CollectConfig, getDisplayName, getIconType diff --git a/x-pack/plugins/ui_actions_enhanced/public/index.ts b/x-pack/plugins/ui_actions_enhanced/public/index.ts index 3135cf44a7aa..453a633e851a 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/index.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/index.ts @@ -13,38 +13,42 @@ export function plugin(initializerContext: PluginInitializerContext) { } export { AdvancedUiActionsPublicPlugin as Plugin }; -export { +export type { SetupContract as AdvancedUiActionsSetup, StartContract as AdvancedUiActionsStart, } from './plugin'; -export { +export type { ActionFactoryDefinition as UiActionsEnhancedActionFactoryDefinition, - ActionFactory as UiActionsEnhancedActionFactory, SerializedAction as UiActionsEnhancedSerializedAction, SerializedEvent as UiActionsEnhancedSerializedEvent, - AbstractActionStorage as UiActionsEnhancedAbstractActionStorage, - DynamicActionManager as UiActionsEnhancedDynamicActionManager, DynamicActionManagerParams as UiActionsEnhancedDynamicActionManagerParams, DynamicActionManagerState as UiActionsEnhancedDynamicActionManagerState, - MemoryActionStorage as UiActionsEnhancedMemoryActionStorage, BaseActionFactoryContext as UiActionsEnhancedBaseActionFactoryContext, BaseActionConfig as UiActionsEnhancedBaseActionConfig, } from './dynamic_actions'; - -export { DynamicActionsState } from './services/ui_actions_service_enhancements'; - export { + ActionFactory as UiActionsEnhancedActionFactory, + AbstractActionStorage as UiActionsEnhancedAbstractActionStorage, + DynamicActionManager as UiActionsEnhancedDynamicActionManager, + MemoryActionStorage as UiActionsEnhancedMemoryActionStorage, +} from './dynamic_actions'; + +export type { DynamicActionsState } from './services/ui_actions_service_enhancements'; + +export type { DrilldownDefinition as UiActionsEnhancedDrilldownDefinition, DrilldownTemplate as UiActionsEnhancedDrilldownTemplate, } from './drilldowns'; +export type { + UrlDrilldownConfig, + UrlDrilldownGlobalScope, + UrlDrilldownScope, +} from './drilldowns/url_drilldown'; export { urlDrilldownCompileUrl, UrlDrilldownCollectConfig, - UrlDrilldownConfig, - UrlDrilldownGlobalScope, urlDrilldownGlobalScopeProvider, - UrlDrilldownScope, urlDrilldownValidateUrl, urlDrilldownValidateUrlTemplate, } from './drilldowns/url_drilldown'; diff --git a/x-pack/plugins/ui_actions_enhanced/public/services/ui_actions_service_enhancements.ts b/x-pack/plugins/ui_actions_enhanced/public/services/ui_actions_service_enhancements.ts index 8da9e62766cc..40155617b22e 100644 --- a/x-pack/plugins/ui_actions_enhanced/public/services/ui_actions_service_enhancements.ts +++ b/x-pack/plugins/ui_actions_enhanced/public/services/ui_actions_service_enhancements.ts @@ -22,7 +22,7 @@ import { PersistableStateDefinition } from '../../../../../src/plugins/kibana_ut import { DynamicActionsState } from '../../common/types'; -export { DynamicActionsState }; +export type { DynamicActionsState }; export interface UiActionsServiceEnhancementsParams { readonly actionFactories?: ActionFactoryRegistry; diff --git a/x-pack/plugins/ui_actions_enhanced/server/index.ts b/x-pack/plugins/ui_actions_enhanced/server/index.ts index ef6cc4015c8e..a1d70d3ea4a8 100644 --- a/x-pack/plugins/ui_actions_enhanced/server/index.ts +++ b/x-pack/plugins/ui_actions_enhanced/server/index.ts @@ -12,17 +12,17 @@ export function plugin() { } export { AdvancedUiActionsServerPlugin as Plugin }; -export { +export type { SetupContract as AdvancedUiActionsSetup, StartContract as AdvancedUiActionsStart, } from './plugin'; -export { +export type { ActionFactoryDefinition as UiActionsEnhancedActionFactoryDefinition, ActionFactory as UiActionsEnhancedActionFactory, } from './types'; -export { +export type { DynamicActionsState, BaseActionConfig as UiActionsEnhancedBaseActionConfig, SerializedAction as UiActionsEnhancedSerializedAction, diff --git a/x-pack/plugins/ui_actions_enhanced/server/types.ts b/x-pack/plugins/ui_actions_enhanced/server/types.ts index 24d30d74661b..e0734e31486b 100644 --- a/x-pack/plugins/ui_actions_enhanced/server/types.ts +++ b/x-pack/plugins/ui_actions_enhanced/server/types.ts @@ -24,4 +24,4 @@ export interface ActionFactory

id: string; } -export { SerializedEvent, SerializedAction, DynamicActionsState }; +export type { SerializedEvent, SerializedAction, DynamicActionsState }; diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts index b2a1c4e80ec7..2d3fff9d43e2 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/index.ts @@ -5,8 +5,11 @@ * 2.0. */ -export { setup as setupOverviewPage, OverviewTestBed } from './overview.helpers'; -export { setup as setupElasticsearchPage, ElasticsearchTestBed } from './elasticsearch.helpers'; -export { setup as setupKibanaPage, KibanaTestBed } from './kibana.helpers'; +export type { OverviewTestBed } from './overview.helpers'; +export { setup as setupOverviewPage } from './overview.helpers'; +export type { ElasticsearchTestBed } from './elasticsearch.helpers'; +export { setup as setupElasticsearchPage } from './elasticsearch.helpers'; +export type { KibanaTestBed } from './kibana.helpers'; +export { setup as setupKibanaPage } from './kibana.helpers'; export { setupEnvironment, kibanaVersion } from './setup_environment'; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/index.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/index.tsx index 6b9eee80acb5..dad239ddb81b 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/index.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/reindex/flyout/index.tsx @@ -5,4 +5,5 @@ * 2.0. */ -export { ReindexFlyout, ReindexFlyoutProps } from './container'; +export type { ReindexFlyoutProps } from './container'; +export { ReindexFlyout } from './container'; diff --git a/x-pack/plugins/upgrade_assistant/public/shared_imports.ts b/x-pack/plugins/upgrade_assistant/public/shared_imports.ts index 64b52065f63e..06816daac428 100644 --- a/x-pack/plugins/upgrade_assistant/public/shared_imports.ts +++ b/x-pack/plugins/upgrade_assistant/public/shared_imports.ts @@ -8,18 +8,20 @@ import { useKibana as _useKibana } from '../../../../src/plugins/kibana_react/public'; import { AppServicesContext } from './types'; -export { - sendRequest, +export type { SendRequestConfig, SendRequestResponse, - useRequest, UseRequestConfig, +} from '../../../../src/plugins/es_ui_shared/public/'; +export { + sendRequest, + useRequest, SectionLoading, GlobalFlyout, } from '../../../../src/plugins/es_ui_shared/public/'; export { KibanaContextProvider } from '../../../../src/plugins/kibana_react/public'; -export { DataPublicPluginStart } from '../../../../src/plugins/data/public'; +export type { DataPublicPluginStart } from '../../../../src/plugins/data/public'; export const useKibana = () => _useKibana(); diff --git a/x-pack/plugins/uptime/common/runtime_types/snapshot/index.ts b/x-pack/plugins/uptime/common/runtime_types/snapshot/index.ts index a09e5455015a..15f190a0dacd 100644 --- a/x-pack/plugins/uptime/common/runtime_types/snapshot/index.ts +++ b/x-pack/plugins/uptime/common/runtime_types/snapshot/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { Snapshot, SnapshotType } from './snapshot_count'; +export type { Snapshot } from './snapshot_count'; +export { SnapshotType } from './snapshot_count'; diff --git a/x-pack/plugins/uptime/public/components/common/higher_order/index.ts b/x-pack/plugins/uptime/public/components/common/higher_order/index.ts index d1d95b7cb099..403f942a3d7c 100644 --- a/x-pack/plugins/uptime/public/components/common/higher_order/index.ts +++ b/x-pack/plugins/uptime/public/components/common/higher_order/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ResponsiveWrapperProps, withResponsiveWrapper } from './responsive_wrapper'; +export type { ResponsiveWrapperProps } from './responsive_wrapper'; +export { withResponsiveWrapper } from './responsive_wrapper'; diff --git a/x-pack/plugins/uptime/public/components/monitor/synthetics/waterfall/index.tsx b/x-pack/plugins/uptime/public/components/monitor/synthetics/waterfall/index.tsx index 0de1b50ecce8..b83cb630aaa7 100644 --- a/x-pack/plugins/uptime/public/components/monitor/synthetics/waterfall/index.tsx +++ b/x-pack/plugins/uptime/public/components/monitor/synthetics/waterfall/index.tsx @@ -5,11 +5,12 @@ * 2.0. */ -export { WaterfallChart, RenderItem, WaterfallChartProps } from './components/waterfall_chart'; +export type { RenderItem, WaterfallChartProps } from './components/waterfall_chart'; +export { WaterfallChart } from './components/waterfall_chart'; export { WaterfallProvider, useWaterfallContext } from './context/waterfall_chart'; export { MiddleTruncatedText } from './components/middle_truncated_text'; export { useFlyout } from './components/use_flyout'; -export { +export type { WaterfallData, WaterfallDataEntry, WaterfallMetadata, diff --git a/x-pack/plugins/uptime/public/components/overview/alerts/alerts_containers/index.ts b/x-pack/plugins/uptime/public/components/overview/alerts/alerts_containers/index.ts index 05223cc367c7..db1ca00c36ba 100644 --- a/x-pack/plugins/uptime/public/components/overview/alerts/alerts_containers/index.ts +++ b/x-pack/plugins/uptime/public/components/overview/alerts/alerts_containers/index.ts @@ -5,8 +5,6 @@ * 2.0. */ -export { - ToggleAlertFlyoutButton, - ToggleAlertFlyoutButtonProps, -} from './toggle_alert_flyout_button'; +export type { ToggleAlertFlyoutButtonProps } from './toggle_alert_flyout_button'; +export { ToggleAlertFlyoutButton } from './toggle_alert_flyout_button'; export { UptimeAlertsFlyoutWrapper } from './uptime_alerts_flyout_wrapper'; diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/index.ts b/x-pack/plugins/uptime/public/components/overview/monitor_list/index.ts index 4d54668b6e24..86e4c6907b7d 100644 --- a/x-pack/plugins/uptime/public/components/overview/monitor_list/index.ts +++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/index.ts @@ -6,7 +6,7 @@ */ export { MonitorListComponent } from './monitor_list'; -export { Criteria, Pagination } from './types'; +export type { Criteria, Pagination } from './types'; export { LocationLink } from './monitor_list_drawer'; export { MonitorListDrawer } from './monitor_list_drawer/list_drawer_container'; export { ActionsPopover } from './monitor_list_drawer/actions_popover/actions_popover_container'; diff --git a/x-pack/plugins/uptime/public/contexts/index.ts b/x-pack/plugins/uptime/public/contexts/index.ts index 0a5d3441bfe2..8467691064bf 100644 --- a/x-pack/plugins/uptime/public/contexts/index.ts +++ b/x-pack/plugins/uptime/public/contexts/index.ts @@ -6,11 +6,8 @@ */ export { UptimeRefreshContext, UptimeRefreshContextProvider } from './uptime_refresh_context'; -export { - UptimeSettingsContextValues, - UptimeSettingsContext, - UptimeSettingsContextProvider, -} from './uptime_settings_context'; +export type { UptimeSettingsContextValues } from './uptime_settings_context'; +export { UptimeSettingsContext, UptimeSettingsContextProvider } from './uptime_settings_context'; export { UptimeThemeContextProvider, UptimeThemeContext } from './uptime_theme_context'; export { UptimeStartupPluginsContext, diff --git a/x-pack/plugins/uptime/public/lib/helper/index.ts b/x-pack/plugins/uptime/public/lib/helper/index.ts index 2fce3cc0e54d..c06e1efc3813 100644 --- a/x-pack/plugins/uptime/public/lib/helper/index.ts +++ b/x-pack/plugins/uptime/public/lib/helper/index.ts @@ -9,5 +9,6 @@ export { convertMicrosecondsToMilliseconds } from './convert_measurements'; export * from './observability_integration'; export { getChartDateLabel } from './charts'; export { seriesHasDownValues } from './series_has_down_values'; -export { UptimeUrlParams, getSupportedUrlParams } from './url_params'; +export type { UptimeUrlParams } from './url_params'; +export { getSupportedUrlParams } from './url_params'; export { MountWithReduxProvider } from './helper_with_redux'; diff --git a/x-pack/plugins/uptime/public/lib/helper/url_params/index.ts b/x-pack/plugins/uptime/public/lib/helper/url_params/index.ts index 958a7b904da9..8b1ff815c1c1 100644 --- a/x-pack/plugins/uptime/public/lib/helper/url_params/index.ts +++ b/x-pack/plugins/uptime/public/lib/helper/url_params/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { UptimeUrlParams, getSupportedUrlParams } from './get_supported_url_params'; +export type { UptimeUrlParams } from './get_supported_url_params'; +export { getSupportedUrlParams } from './get_supported_url_params'; diff --git a/x-pack/plugins/uptime/server/lib/domains/index.ts b/x-pack/plugins/uptime/server/lib/domains/index.ts index e0252e7d4a3e..ed459d39e246 100644 --- a/x-pack/plugins/uptime/server/lib/domains/index.ts +++ b/x-pack/plugins/uptime/server/lib/domains/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { licenseCheck, UMLicenseCheck } from './license'; +export type { UMLicenseCheck } from './license'; +export { licenseCheck } from './license'; diff --git a/x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts b/x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts index 09a841ff147a..37fe71d14398 100644 --- a/x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts +++ b/x-pack/plugins/watcher/__jest__/client_integration/helpers/index.ts @@ -11,7 +11,8 @@ import { setup as watchCreateJsonSetup } from './watch_create_json.helpers'; import { setup as watchCreateThresholdSetup } from './watch_create_threshold.helpers'; import { setup as watchEditSetup } from './watch_edit.helpers'; -export { getRandomString, findTestSubject, TestBed } from '@kbn/test/jest'; +export type { TestBed } from '@kbn/test/jest'; +export { getRandomString, findTestSubject } from '@kbn/test/jest'; export { wrapBodyResponse, unwrapBodyResponse } from './body_response'; export { setupEnvironment } from './setup_environment'; diff --git a/x-pack/plugins/watcher/public/application/components/index.ts b/x-pack/plugins/watcher/public/application/components/index.ts index f70c15bda18b..f10dfe9b1e28 100644 --- a/x-pack/plugins/watcher/public/application/components/index.ts +++ b/x-pack/plugins/watcher/public/application/components/index.ts @@ -11,4 +11,5 @@ export { DeleteWatchesModal } from './delete_watches_modal'; export { ErrableFormRow } from './form_errors'; export { WatchStatus } from './watch_status'; export { SectionLoading } from './section_loading'; -export { SectionError, Error } from './section_error'; +export type { Error } from './section_error'; +export { SectionError } from './section_error'; diff --git a/x-pack/plugins/watcher/public/application/shared_imports.ts b/x-pack/plugins/watcher/public/application/shared_imports.ts index 977204c627e5..a076fed8be58 100644 --- a/x-pack/plugins/watcher/public/application/shared_imports.ts +++ b/x-pack/plugins/watcher/public/application/shared_imports.ts @@ -5,10 +5,12 @@ * 2.0. */ -export { +export type { SendRequestConfig, SendRequestResponse, UseRequestConfig, +} from '../../../../../src/plugins/es_ui_shared/public'; +export { sendRequest, useRequest, XJson, diff --git a/x-pack/plugins/watcher/public/legacy/parse_es_interval/index.ts b/x-pack/plugins/watcher/public/legacy/parse_es_interval/index.ts index 0af13b3abbf5..b172a0b217c5 100644 --- a/x-pack/plugins/watcher/public/legacy/parse_es_interval/index.ts +++ b/x-pack/plugins/watcher/public/legacy/parse_es_interval/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -export { parseEsInterval, ParsedInterval } from './parse_es_interval'; +export type { ParsedInterval } from './parse_es_interval'; +export { parseEsInterval } from './parse_es_interval'; export { InvalidEsCalendarIntervalError } from './invalid_es_calendar_interval_error'; export { InvalidEsIntervalFormatError } from './invalid_es_interval_format_error'; export { isValidEsInterval } from './is_valid_es_interval'; diff --git a/x-pack/test/alerting_api_integration/common/lib/index.ts b/x-pack/test/alerting_api_integration/common/lib/index.ts index eeb9c8826966..305c42b5c1d6 100644 --- a/x-pack/test/alerting_api_integration/common/lib/index.ts +++ b/x-pack/test/alerting_api_integration/common/lib/index.ts @@ -14,7 +14,8 @@ export { getConsumerUnauthorizedErrorMessage, getProducerUnauthorizedErrorMessage, } from './alert_utils'; -export { TaskManagerUtils, TaskManagerDoc } from './task_manager_utils'; +export type { TaskManagerDoc } from './task_manager_utils'; +export { TaskManagerUtils } from './task_manager_utils'; export * from './test_assertions'; export { checkAAD } from './check_aad'; export { getEventLog } from './get_event_log'; diff --git a/x-pack/test/api_integration/apis/management/snapshot_restore/lib/index.ts b/x-pack/test/api_integration/apis/management/snapshot_restore/lib/index.ts index a9721c585659..469ee43e4bef 100644 --- a/x-pack/test/api_integration/apis/management/snapshot_restore/lib/index.ts +++ b/x-pack/test/api_integration/apis/management/snapshot_restore/lib/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { registerEsHelpers, SlmPolicy } from './elasticsearch'; +export type { SlmPolicy } from './elasticsearch'; +export { registerEsHelpers } from './elasticsearch'; diff --git a/x-pack/test/apm_api_integration/common/ftr_provider_context.ts b/x-pack/test/apm_api_integration/common/ftr_provider_context.ts index cac430469643..b5f2a4a42d91 100644 --- a/x-pack/test/apm_api_integration/common/ftr_provider_context.ts +++ b/x-pack/test/apm_api_integration/common/ftr_provider_context.ts @@ -16,5 +16,5 @@ export type InheritedServices = InheritedFtrProviderContext extends GenericFtrPr ? TServices : {}; -export { InheritedFtrProviderContext }; +export type { InheritedFtrProviderContext }; export type FtrProviderContext = GenericFtrProviderContext; diff --git a/x-pack/test/functional_enterprise_search/services/app_search_service.ts b/x-pack/test/functional_enterprise_search/services/app_search_service.ts index edb3957692f2..6cd3cac9f336 100644 --- a/x-pack/test/functional_enterprise_search/services/app_search_service.ts +++ b/x-pack/test/functional_enterprise_search/services/app_search_service.ts @@ -22,7 +22,7 @@ export interface IUser { user: string; password: string; } -export { IEngine }; +export type { IEngine }; export class AppSearchService { getEnterpriseSearchUser(): IUser { diff --git a/x-pack/test/observability_api_integration/common/ftr_provider_context.ts b/x-pack/test/observability_api_integration/common/ftr_provider_context.ts index 8f59a8d38528..2ea45b854eb2 100644 --- a/x-pack/test/observability_api_integration/common/ftr_provider_context.ts +++ b/x-pack/test/observability_api_integration/common/ftr_provider_context.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { FtrProviderContext } from '../../api_integration/ftr_provider_context'; +export type { FtrProviderContext } from '../../api_integration/ftr_provider_context'; diff --git a/x-pack/test/plugin_functional/plugins/global_search_test/public/index.ts b/x-pack/test/plugin_functional/plugins/global_search_test/public/index.ts index 43adc3f1036e..9450384458d0 100644 --- a/x-pack/test/plugin_functional/plugins/global_search_test/public/index.ts +++ b/x-pack/test/plugin_functional/plugins/global_search_test/public/index.ts @@ -21,7 +21,7 @@ export const plugin: PluginInitializer< GlobalSearchTestPluginStartDeps > = () => new GlobalSearchTestPlugin(); -export { +export type { GlobalSearchTestPluginSetup, GlobalSearchTestPluginStart, GlobalSearchTestPluginSetupDeps, diff --git a/x-pack/test/saved_object_tagging/common/lib/index.ts b/x-pack/test/saved_object_tagging/common/lib/index.ts index ae662def2459..9d23dc2541f8 100644 --- a/x-pack/test/saved_object_tagging/common/lib/index.ts +++ b/x-pack/test/saved_object_tagging/common/lib/index.ts @@ -5,6 +5,6 @@ * 2.0. */ -export { Role, User, ExpectedResponse } from './types'; +export type { Role, User, ExpectedResponse } from './types'; export { ROLES, USERS } from './authentication'; export { createUsersAndRoles } from './create_users_and_roles'; diff --git a/yarn.lock b/yarn.lock index a2ada4a15723..35cc741af9d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6429,15 +6429,10 @@ "@types/parse5" "*" "@types/tough-cookie" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.4": - version "7.0.5" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" - integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== - -"@types/json-schema@^7.0.6", "@types/json-schema@^7.0.7": - version "7.0.7" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" - integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== +"@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.9": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== "@types/json-stable-stringify@^1.0.32": version "1.0.32" @@ -7350,20 +7345,33 @@ resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg== -"@typescript-eslint/eslint-plugin@^4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.2.tgz#9f41efaee32cdab7ace94b15bd19b756dd099b0a" - integrity sha512-w63SCQ4bIwWN/+3FxzpnWrDjQRXVEGiTt9tJTRptRXeFvdZc/wLiz3FQUwNQ2CVoRGI6KUWMNUj/pk63noUfcA== +"@typescript-eslint/eslint-plugin@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.2.0.tgz#2bdb247cc2e2afce7efbce09afb9a6f0a8a08434" + integrity sha512-qQwg7sqYkBF4CIQSyRQyqsYvP+g/J0To9ZPVNJpfxfekl5RmdvQnFFTVVwpRtaUDFNvjfe/34TgY/dpc3MgNTw== dependencies: - "@typescript-eslint/experimental-utils" "4.31.2" - "@typescript-eslint/scope-manager" "4.31.2" - debug "^4.3.1" + "@typescript-eslint/experimental-utils" "5.2.0" + "@typescript-eslint/scope-manager" "5.2.0" + debug "^4.3.2" functional-red-black-tree "^1.0.1" - regexpp "^3.1.0" + ignore "^5.1.8" + regexpp "^3.2.0" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.31.2", "@typescript-eslint/experimental-utils@^4.0.1": +"@typescript-eslint/experimental-utils@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.2.0.tgz#e3b2cb9cd0aff9b50f68d9a414c299fd26b067e6" + integrity sha512-fWyT3Agf7n7HuZZRpvUYdFYbPk3iDCq6fgu3ulia4c7yxmPnwVBovdSOX7RL+k8u6hLbrXcdAehlWUVpGh6IEw== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.2.0" + "@typescript-eslint/types" "5.2.0" + "@typescript-eslint/typescript-estree" "5.2.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/experimental-utils@^4.0.1": version "4.31.2" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.2.tgz#98727a9c1e977dd5d20c8705e69cd3c2a86553fa" integrity sha512-3tm2T4nyA970yQ6R3JZV9l0yilE2FedYg8dcXrTar34zC9r6JB7WyBQbpIVongKPlhEMjhQ01qkwrzWy38Bk1Q== @@ -7375,15 +7383,15 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/parser@^4.31.2": - version "4.31.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.31.2.tgz#54aa75986e3302d91eff2bbbaa6ecfa8084e9c34" - integrity sha512-EcdO0E7M/sv23S/rLvenHkb58l3XhuSZzKf6DBvLgHqOYdL6YFMYVtreGFWirxaU2mS1GYDby3Lyxco7X5+Vjw== +"@typescript-eslint/parser@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.2.0.tgz#dc081aa89de16b5676b10215519af3aa7b58fb72" + integrity sha512-Uyy4TjJBlh3NuA8/4yIQptyJb95Qz5PX//6p8n7zG0QnN4o3NF9Je3JHbVU7fxf5ncSXTmnvMtd/LDQWDk0YqA== dependencies: - "@typescript-eslint/scope-manager" "4.31.2" - "@typescript-eslint/types" "4.31.2" - "@typescript-eslint/typescript-estree" "4.31.2" - debug "^4.3.1" + "@typescript-eslint/scope-manager" "5.2.0" + "@typescript-eslint/types" "5.2.0" + "@typescript-eslint/typescript-estree" "5.2.0" + debug "^4.3.2" "@typescript-eslint/scope-manager@4.31.2": version "4.31.2" @@ -7393,12 +7401,25 @@ "@typescript-eslint/types" "4.31.2" "@typescript-eslint/visitor-keys" "4.31.2" +"@typescript-eslint/scope-manager@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.2.0.tgz#7ce8e4ab2baaa0ad5282913ea8e13ce03ec6a12a" + integrity sha512-RW+wowZqPzQw8MUFltfKYZfKXqA2qgyi6oi/31J1zfXJRpOn6tCaZtd9b5u9ubnDG2n/EMvQLeZrsLNPpaUiFQ== + dependencies: + "@typescript-eslint/types" "5.2.0" + "@typescript-eslint/visitor-keys" "5.2.0" + "@typescript-eslint/types@4.31.2": version "4.31.2" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.31.2.tgz#2aea7177d6d744521a168ed4668eddbd912dfadf" integrity sha512-kWiTTBCTKEdBGrZKwFvOlGNcAsKGJSBc8xLvSjSppFO88AqGxGNYtF36EuEYG6XZ9vT0xX8RNiHbQUKglbSi1w== -"@typescript-eslint/typescript-estree@4.31.2", "@typescript-eslint/typescript-estree@^4.31.2": +"@typescript-eslint/types@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.2.0.tgz#7ad32d15abddb0ee968a330f0ea182ea544ef7cf" + integrity sha512-cTk6x08qqosps6sPyP2j7NxyFPlCNsJwSDasqPNjEQ8JMD5xxj2NHxcLin5AJQ8pAVwpQ8BMI3bTxR0zxmK9qQ== + +"@typescript-eslint/typescript-estree@4.31.2": version "4.31.2" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.2.tgz#abfd50594d8056b37e7428df3b2d185ef2d0060c" integrity sha512-ieBq8U9at6PvaC7/Z6oe8D3czeW5d//Fo1xkF/s9394VR0bg/UaMYPdARiWyKX+lLEjY3w/FNZJxitMsiWv+wA== @@ -7411,6 +7432,19 @@ semver "^7.3.5" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.2.0", "@typescript-eslint/typescript-estree@^5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.2.0.tgz#c22e0ff6f8a4a3f78504a80ebd686fe2870a68ae" + integrity sha512-RsdXq2XmVgKbm9nLsE3mjNUM7BTr/K4DYR9WfFVMUuozHWtH5gMpiNZmtrMG8GR385EOSQ3kC9HiEMJWimxd/g== + dependencies: + "@typescript-eslint/types" "5.2.0" + "@typescript-eslint/visitor-keys" "5.2.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/visitor-keys@4.31.2": version "4.31.2" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.2.tgz#7d5b4a4705db7fe59ecffb273c1d082760f635cc" @@ -7419,6 +7453,14 @@ "@typescript-eslint/types" "4.31.2" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@5.2.0": + version "5.2.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.2.0.tgz#03522d35df98474f08e0357171a7d1b259a88f55" + integrity sha512-Nk7HizaXWWCUBfLA/rPNKMzXzWS8Wg9qHMuGtT+v2/YpPij4nVXrVJc24N/r5WrrmqK31jCrZxeHqIgqRzs0Xg== + dependencies: + "@typescript-eslint/types" "5.2.0" + eslint-visitor-keys "^3.0.0" + "@ungap/promise-all-settled@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" @@ -13962,16 +14004,16 @@ eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" - integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== - -eslint-visitor-keys@^2.1.0: +eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +eslint-visitor-keys@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz#e32e99c6cdc2eb063f204eda5db67bfe58bb4186" + integrity sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q== + eslint@^7.32.0: version "7.32.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" @@ -15659,10 +15701,10 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.1, globby@^11.0.3: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== +globby@^11.0.1, globby@^11.0.3, globby@^11.0.4: + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -17289,10 +17331,10 @@ is-glob@^3.0.0, is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" @@ -24806,10 +24848,10 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.0, regexp.prototype.f call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.0.0, regexpp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" - integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== +regexpp@^3.0.0, regexpp@^3.1.0, regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== regexpu-core@^4.7.1: version "4.7.1"