diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/Tooltip.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/Tooltip.tsx index 3b4aed17e46eb..c49931427fbf6 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/Tooltip.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/Tooltip.tsx @@ -20,10 +20,10 @@ import React from 'react'; import { useTheme, css } from '@superset-ui/core'; import { Tooltip as BaseTooltip } from 'antd'; -import { TooltipProps } from 'antd/lib/tooltip'; +import type { TooltipProps } from 'antd/lib/tooltip'; import { Global } from '@emotion/react'; -export { TooltipProps } from 'antd/lib/tooltip'; +export type { TooltipProps } from 'antd/lib/tooltip'; export const Tooltip = ({ overlayStyle, color, ...props }: TooltipProps) => { const theme = useTheme(); diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts index 581787b4651ca..9e4e204866fc3 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/types.ts +++ b/superset-frontend/packages/superset-ui-chart-controls/src/types.ts @@ -18,7 +18,7 @@ * under the License. */ import React, { ReactNode, ReactText, ReactElement } from 'react'; -import { +import type { AdhocColumn, Column, DatasourceType, @@ -29,9 +29,9 @@ import { import { sharedControls } from './shared-controls'; import sharedControlComponents from './shared-controls/components'; -export { Metric } from '@superset-ui/core'; -export { ControlFormItemSpec } from './components/ControlForm'; -export { ControlComponentProps } from './shared-controls/components/types'; +export type { Metric } from '@superset-ui/core'; +export type { ControlFormItemSpec } from './components/ControlForm'; +export type { ControlComponentProps } from './shared-controls/components/types'; // eslint-disable-next-line @typescript-eslint/no-explicit-any type AnyDict = Record; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/index.ts b/superset-frontend/packages/superset-ui-core/src/chart/index.ts index 0db3d1a3e1432..c1588023a324a 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/index.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/index.ts @@ -31,7 +31,7 @@ export { default as getChartComponentRegistry } from './registries/ChartComponen export { default as getChartControlPanelRegistry } from './registries/ChartControlPanelRegistrySingleton'; export { default as getChartMetadataRegistry } from './registries/ChartMetadataRegistrySingleton'; export { default as getChartTransformPropsRegistry } from './registries/ChartTransformPropsRegistrySingleton'; -export { BuildQuery } from './registries/ChartBuildQueryRegistrySingleton'; +export type { BuildQuery } from './registries/ChartBuildQueryRegistrySingleton'; export { default as ChartDataProvider } from './components/ChartDataProvider'; diff --git a/superset-frontend/src/common/components/index.tsx b/superset-frontend/src/common/components/index.tsx index 04c3142c7f703..3deeff20ec5f7 100644 --- a/superset-frontend/src/common/components/index.tsx +++ b/superset-frontend/src/common/components/index.tsx @@ -58,13 +58,17 @@ export { Input as AntdInput, } from 'antd'; export { Card as AntdCard } from 'antd'; -export { default as Modal, ModalProps } from 'antd/lib/modal'; -export { FormInstance } from 'antd/lib/form'; -export { RadioChangeEvent } from 'antd/lib/radio'; -export { TreeProps } from 'antd/lib/tree'; -export { default as Alert, AlertProps } from 'antd/lib/alert'; -export { default as Select, SelectProps } from 'antd/lib/select'; -export { default as List, ListItemProps } from 'antd/lib/list'; +export { default as Modal } from 'antd/lib/modal'; +export type { ModalProps } from 'antd/lib/modal'; +export type { FormInstance } from 'antd/lib/form'; +export type { RadioChangeEvent } from 'antd/lib/radio'; +export type { TreeProps } from 'antd/lib/tree'; +export { default as Alert } from 'antd/lib/alert'; +export { default as Select } from 'antd/lib/select'; +export { default as List } from 'antd/lib/list'; +export type { AlertProps } from 'antd/lib/alert'; +export type { SelectProps } from 'antd/lib/select'; +export type { ListItemProps } from 'antd/lib/list'; export { default as Collapse } from 'src/components/Collapse'; export { default as Badge } from 'src/components/Badge'; diff --git a/superset-frontend/src/components/Form/Form.tsx b/superset-frontend/src/components/Form/Form.tsx index 1fc25e6c498b7..ee40a8cb2c4b6 100644 --- a/superset-frontend/src/components/Form/Form.tsx +++ b/superset-frontend/src/components/Form/Form.tsx @@ -33,4 +33,4 @@ export default function Form(props: FormProps) { return ; } -export { FormProps }; +export type { FormProps }; diff --git a/superset-frontend/src/components/Form/index.tsx b/superset-frontend/src/components/Form/index.tsx index 1aa62ae567088..ec198e0a8285b 100644 --- a/superset-frontend/src/components/Form/index.tsx +++ b/superset-frontend/src/components/Form/index.tsx @@ -21,4 +21,5 @@ import FormItem from './FormItem'; import FormLabel from './FormLabel'; import LabeledErrorBoundInput from './LabeledErrorBoundInput'; -export { Form, FormItem, FormLabel, LabeledErrorBoundInput, FormProps }; +export { Form, FormItem, FormLabel, LabeledErrorBoundInput }; +export type { FormProps }; diff --git a/superset-frontend/src/components/Icons/index.tsx b/superset-frontend/src/components/Icons/index.tsx index 85ababc1dbaf7..08b13404a04d2 100644 --- a/superset-frontend/src/components/Icons/index.tsx +++ b/superset-frontend/src/components/Icons/index.tsx @@ -165,7 +165,7 @@ IconFileNames.forEach(fileName => { ); }); -export { IconType }; +export type { IconType }; export default { ...AntdEnhancedIcons, diff --git a/superset-frontend/src/components/Select/NativeSelect.tsx b/superset-frontend/src/components/Select/NativeSelect.tsx index 2f690b1ba6d8d..ba2b9b65843bf 100644 --- a/superset-frontend/src/components/Select/NativeSelect.tsx +++ b/superset-frontend/src/components/Select/NativeSelect.tsx @@ -20,7 +20,7 @@ import React from 'react'; import { styled } from '@superset-ui/core'; import Select, { SelectProps } from 'antd/lib/select'; -export { +export type { OptionType as NativeSelectOptionType, SelectProps as NativeSelectProps, } from 'antd/lib/select'; diff --git a/superset-frontend/src/components/Slider/index.tsx b/superset-frontend/src/components/Slider/index.tsx index 904833e174f84..c513195e9ab8f 100644 --- a/superset-frontend/src/components/Slider/index.tsx +++ b/superset-frontend/src/components/Slider/index.tsx @@ -22,7 +22,7 @@ import AntDSlider, { SliderRangeProps, } from 'antd/lib/slider'; -export { SliderSingleProps, SliderRangeProps }; +export type { SliderSingleProps, SliderRangeProps }; export default function Slider(props: SliderSingleProps | SliderRangeProps) { return ; diff --git a/superset-frontend/src/components/Switch/index.tsx b/superset-frontend/src/components/Switch/index.tsx index 3a01f32519199..0ab27ce8c7c5e 100644 --- a/superset-frontend/src/components/Switch/index.tsx +++ b/superset-frontend/src/components/Switch/index.tsx @@ -27,4 +27,4 @@ const StyledSwitch = styled(BaseSwitch)` `; export const Switch = (props: SwitchProps) => ; -export { SwitchProps }; +export type { SwitchProps }; diff --git a/superset-frontend/src/featureFlags.ts b/superset-frontend/src/featureFlags.ts index 118f0c3a44ae8..4d457fd527f9b 100644 --- a/superset-frontend/src/featureFlags.ts +++ b/superset-frontend/src/featureFlags.ts @@ -18,7 +18,8 @@ */ import { FeatureFlagMap, FeatureFlag } from '@superset-ui/core'; -export { FeatureFlagMap, FeatureFlag } from '@superset-ui/core'; +export { FeatureFlag } from '@superset-ui/core'; +export type { FeatureFlagMap } from '@superset-ui/core'; export function initFeatureFlags(featureFlags: FeatureFlagMap) { if (!window.featureFlags) {