Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Typescript warnings when importing types #24217

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion superset-frontend/src/components/Checkbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
export { default, CheckboxProps } from 'src/components/Checkbox/Checkbox';
export { default } from 'src/components/Checkbox/Checkbox';
export type { CheckboxProps } from 'src/components/Checkbox/Checkbox';
export * from 'src/components/Checkbox/CheckboxIcons';
10 changes: 4 additions & 6 deletions superset-frontend/src/components/MetadataBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
import MetadataBar, {
MetadataBarProps,
MIN_NUMBER_ITEMS,
MAX_NUMBER_ITEMS,
} from './MetadataBar';
import MetadataBar, { MIN_NUMBER_ITEMS, MAX_NUMBER_ITEMS } from './MetadataBar';

export type { MetadataBarProps } from './MetadataBar';

export default MetadataBar;

export { MetadataBarProps, MIN_NUMBER_ITEMS, MAX_NUMBER_ITEMS };
export { MIN_NUMBER_ITEMS, MAX_NUMBER_ITEMS };

export * from './ContentType';
4 changes: 2 additions & 2 deletions superset-frontend/src/components/Popover/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
import { Popover } from 'antd';

export { PopoverProps } from 'antd/lib/popover';
export { TooltipPlacement } from 'antd/lib/tooltip';
export type { PopoverProps } from 'antd/lib/popover';
export type { TooltipPlacement } from 'antd/lib/tooltip';

// Eventually Popover can be wrapped and customized in this file
// for now we're just redirecting
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export enum ETableAction {
FILTER = 'filter',
}

export { ColumnsType };
export type { ColumnsType };
export type OnChangeFunction<RecordType> =
AntTableProps<RecordType>['onChange'];

Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/dashboard/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { UrlParamEntries } from 'src/utils/urlUtils';
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
import { ChartState } from '../explore/types';

export { Dashboard } from 'src/types/Dashboard';
export type { Dashboard } from 'src/types/Dashboard';

export type ChartReducerInitialState = typeof chart;

Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/hooks/apiResources/queryApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
RequestBase,
} from '@superset-ui/core';

export { JsonResponse, TextResponse } from '@superset-ui/core';
export type { JsonResponse, TextResponse } from '@superset-ui/core';

export const supersetClientQuery: BaseQueryFn<
Pick<RequestBase, 'method' | 'body' | 'jsonPayload' | 'postPayload'> & {
Expand Down
Loading