Skip to content

Commit 13941e1

Browse files
authored
ref(✂️): remove unused types (#90051)
This PR removes `types`, `interfaces` and `enums` that aren’t used anymore in the codebase.
1 parent 8a0590c commit 13941e1

File tree

42 files changed

+1
-345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1
-345
lines changed

static/app/components/acl/feature.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ type Props = {
6969
requireAll?: boolean;
7070
};
7171

72-
/**
73-
* Normalized props for feature configuration objects
74-
*/
75-
export type FeatureProps = Omit<Props, 'children' | 'config' | 'organization'>;
76-
7772
/**
7873
* Common props passed to children and disabled render handlers.
7974
*/

static/app/components/activity/note/types.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@ import type {OnChangeHandlerFunc} from 'react-mentions';
22

33
import type {DEFAULT_ERROR_JSON} from 'sentry/constants';
44

5-
/**
6-
* Represents a mentionable user or team.
7-
*/
8-
export type Mentionable = {
9-
display: string;
10-
email: string;
11-
id: string;
12-
};
13-
145
/**
156
* List of id, display name
167
*/

static/app/components/arithmeticBuilder/action.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ function isArithmeticBuilderReplaceAction(
4949
return action.type === 'REPLACE_TOKEN';
5050
}
5151

52-
export interface ArithmeticBuilderState {
53-
expression: string;
54-
focusOverride: FocusOverride | null;
55-
}
56-
5752
interface UseArithmeticBuilderActionOptions {
5853
initialExpression: string;
5954
updateExpression?: (expression: Expression) => void;

static/app/components/charts/useSessionsRequest.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ import {useApiQuery} from 'sentry/utils/queryClient';
66
import {filterSessionsInTimeWindow, getSessionsInterval} from 'sentry/utils/sessions';
77
import useOrganization from 'sentry/utils/useOrganization';
88

9-
export type SessionsRequestRenderProps = {
10-
errored: boolean;
11-
loading: boolean;
12-
reloading: boolean;
13-
response: SessionApiResponse | null;
14-
};
15-
169
type Props = {
1710
field: SessionFieldWithOperation[];
1811
end?: string;

static/app/components/deprecatedSmartSearchBar/types.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ export type SearchItem = {
6464
value?: string | null;
6565
};
6666

67-
export type Tag = {
68-
desc: string;
69-
key: string;
70-
predefined: boolean;
71-
values: string[];
72-
};
73-
7467
export enum ShortcutType {
7568
DELETE = 'delete',
7669
NEGATE = 'negate',

static/app/components/dropdownAutoComplete/index.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ interface StaticDropdownAutoCompleteProps extends BaseProps {
4242
lazyItems?: never;
4343
}
4444

45-
export type DropdownAutoCompleteProps =
46-
| LazyDropdownAutoCompleteProps
47-
| StaticDropdownAutoCompleteProps;
48-
4945
/**
5046
* @deprecated prefer using CompactSelect
5147
*/

static/app/components/events/autofix/types.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ export enum AutofixStepType {
2121
SOLUTION = 'solution',
2222
}
2323

24-
export enum AutofixCodebaseIndexingStatus {
25-
UP_TO_DATE = 'up_to_date',
26-
INDEXING = 'indexing',
27-
NOT_INDEXED = 'not_indexed',
28-
OUT_OF_DATE = 'out_of_date',
29-
ERRORED = 'errored',
30-
}
31-
3224
export enum AutofixStatus {
3325
COMPLETED = 'COMPLETED',
3426
ERROR = 'ERROR',
@@ -47,12 +39,6 @@ type AutofixOptions = {
4739
iterative_feedback?: boolean;
4840
};
4941

50-
export type AutofixUpdateEndpointResponse = {
51-
run_id: number;
52-
message?: string;
53-
status?: 'success' | 'error';
54-
};
55-
5642
type CodebaseState = {
5743
is_readable: boolean | null;
5844
is_writeable: boolean | null;
@@ -118,14 +104,6 @@ export interface CommentThreadMessage {
118104
isLoading?: boolean;
119105
}
120106

121-
export type CodeSnippetContext = {
122-
file_path: string;
123-
repo_name: string;
124-
snippet: string;
125-
end_line?: number;
126-
start_line?: number;
127-
};
128-
129107
export type AutofixInsight = {
130108
insight: string;
131109
justification: string;
@@ -254,16 +232,6 @@ export interface AutofixRepoDefinition {
254232
provider: string;
255233
}
256234

257-
export interface Repository {
258-
externalId: string;
259-
id: string;
260-
name: string;
261-
provider?: {
262-
id?: string;
263-
name?: string;
264-
};
265-
}
266-
267235
export interface RepoSettings {
268236
branch: string;
269237
instructions: string;

static/app/components/onboarding/onboardingContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {createContext, useContext, useMemo} from 'react';
33
import type {OnboardingSelectedSDK} from 'sentry/types/onboarding';
44
import {useSessionStorage} from 'sentry/utils/useSessionStorage';
55

6-
export type OnboardingContextProps = {
6+
type OnboardingContextProps = {
77
setSelectedPlatform: (selectedSDK?: OnboardingSelectedSDK) => void;
88
selectedPlatform?: OnboardingSelectedSDK;
99
};

static/app/types/breadcrumbs.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,6 @@ interface BreadcrumbTypeBase {
4646
timestamp?: string;
4747
}
4848

49-
export interface BreadcrumbTypeSystem extends BreadcrumbTypeBase {
50-
action: string;
51-
extras: Record<string, any>;
52-
type: BreadcrumbType.SYSTEM;
53-
}
54-
55-
export interface BreadcrumbTypeSession extends BreadcrumbTypeBase {
56-
action: string;
57-
extras: Record<string, any>;
58-
type: BreadcrumbType.SESSION;
59-
}
60-
6149
export interface BreadcrumbTypeNavigation extends BreadcrumbTypeBase {
6250
type: BreadcrumbType.NAVIGATION;
6351
data?: null | {
@@ -66,15 +54,6 @@ export interface BreadcrumbTypeNavigation extends BreadcrumbTypeBase {
6654
};
6755
}
6856

69-
export interface BreadcrumbTypeInit extends BreadcrumbTypeBase {
70-
data: {
71-
action: 'replay-init';
72-
label: string;
73-
url: string;
74-
};
75-
type: BreadcrumbType.INIT;
76-
}
77-
7857
export interface BreadcrumbTypeHTTP extends BreadcrumbTypeBase {
7958
type: BreadcrumbType.HTTP;
8059
data?:

static/app/types/core.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ export interface DataCategoryInfo {
125125
snakeCasePlural?: string;
126126
}
127127

128-
export type EventType = 'error' | 'transaction' | 'attachment';
129-
130128
export enum Outcome {
131129
ACCEPTED = 'accepted',
132130
FILTERED = 'filtered',

0 commit comments

Comments
 (0)