Browse Source

ref(ui): Import as type in type files (#33233)

Scott Cooper 2 years ago
parent
commit
496e21347d

+ 1 - 1
static/app/components/events/interfaces/debugMeta/types.tsx

@@ -1,4 +1,4 @@
-import {combineStatus} from './utils';
+import type {combineStatus} from './utils';
 
 export type DebugStatus = ReturnType<typeof combineStatus>;
 

+ 1 - 1
static/app/components/events/interfaces/spans/types.tsx

@@ -1,4 +1,4 @@
-import {Fuse} from 'sentry/utils/fuzzySearch';
+import type {Fuse} from 'sentry/utils/fuzzySearch';
 
 import SpanTreeModel from './spanTreeModel';
 

+ 1 - 1
static/app/components/search/index.tsx

@@ -17,7 +17,7 @@ import RouteSource from 'sentry/components/search/sources/routeSource';
 import {t} from 'sentry/locale';
 import space from 'sentry/styles/space';
 import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
-import {Fuse} from 'sentry/utils/fuzzySearch';
+import type {Fuse} from 'sentry/utils/fuzzySearch';
 import replaceRouterParams from 'sentry/utils/replaceRouterParams';
 
 import {Result} from './sources/types';

+ 1 - 1
static/app/components/search/sources/index.tsx

@@ -1,7 +1,7 @@
 import * as React from 'react';
 import flatten from 'lodash/flatten';
 
-import {Fuse} from 'sentry/utils/fuzzySearch';
+import type {Fuse} from 'sentry/utils/fuzzySearch';
 
 import {Result} from './types';
 

+ 1 - 1
static/app/components/search/sources/types.tsx

@@ -1,4 +1,4 @@
-import {Fuse} from 'sentry/utils/fuzzySearch';
+import type {Fuse} from 'sentry/utils/fuzzySearch';
 
 /**
  * A result item that sources create.

+ 1 - 1
static/app/components/search/sources/utils.tsx

@@ -3,7 +3,7 @@
 // eslint-disable-next-line no-restricted-imports
 import get from 'lodash/get';
 
-import {Fuse} from 'sentry/utils/fuzzySearch';
+import type {Fuse} from 'sentry/utils/fuzzySearch';
 
 /**
  * A value getter for fuse that will ensure the result is a string.

+ 3 - 2
static/app/types/alerts.tsx

@@ -1,5 +1,6 @@
-import {IssueConfigField} from 'sentry/types/index';
-import {SchemaFormConfig} from 'sentry/views/organizationIntegrations/sentryAppExternalForm';
+import type {SchemaFormConfig} from 'sentry/views/organizationIntegrations/sentryAppExternalForm';
+
+import type {IssueConfigField} from './integrations';
 
 type IssueAlertRuleFormField =
   | {

+ 3 - 3
static/app/types/auth.tsx

@@ -1,8 +1,8 @@
-import u2f from 'u2f-api';
+import type u2f from 'u2f-api';
 
-import {Field} from 'sentry/components/forms/type';
+import type {Field} from 'sentry/components/forms/type';
 
-import {Organization} from './organization';
+import type {Organization} from './organization';
 
 export type AuthenticatorDevice = {
   authId: string;

+ 2 - 2
static/app/types/breadcrumbs.tsx

@@ -1,5 +1,5 @@
-import SvgIcon from 'sentry/icons/svgIcon';
-import {Color} from 'sentry/utils/theme';
+import type SvgIcon from 'sentry/icons/svgIcon';
+import type {Color} from 'sentry/utils/theme';
 
 export type IconProps = React.ComponentProps<typeof SvgIcon>;
 

+ 2 - 2
static/app/types/core.tsx

@@ -4,8 +4,8 @@
  * Before a type is put here it should be required in multiple other types.
  * or used in multiple views.
  */
-import {getInterval} from 'sentry/components/charts/utils';
-import {API_ACCESS_SCOPES} from 'sentry/constants';
+import type {getInterval} from 'sentry/components/charts/utils';
+import type {API_ACCESS_SCOPES} from 'sentry/constants';
 
 /**
  * Visual representation of a project/team/organization/user

Some files were not shown because too many files changed in this diff