Skip to content

Commit

Permalink
fix: Typescript warnings when importing types (#24217)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed May 31, 2023
1 parent d1c57e0 commit 5853574
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
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

0 comments on commit 5853574

Please sign in to comment.