Skip to content

chore: remove unused exports #18038

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

Merged
merged 1 commit into from
May 26, 2025
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
7 changes: 1 addition & 6 deletions site/.knip.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,5 @@
"@types/react-virtualized-auto-sizer",
"jest_workaround",
"ts-proto"
],
// Don't report unused exports of types as long as they are used within the file.
"ignoreExportsUsedInFile": {
"interface": true,
"type": true
}
]
}
13 changes: 2 additions & 11 deletions site/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions site/src/api/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ export interface FieldError {
detail: string;
}

export type FieldErrors = Record<FieldError["field"], FieldError["detail"]>;
type FieldErrors = Record<FieldError["field"], FieldError["detail"]>;

export interface ApiErrorResponse {
message: string;
detail?: string;
validations?: FieldError[];
}

export type ApiError = AxiosError<ApiErrorResponse> & {
type ApiError = AxiosError<ApiErrorResponse> & {
response: AxiosResponse<ApiErrorResponse>;
};

Expand Down
2 changes: 1 addition & 1 deletion site/src/api/queries/workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export const agentLogs = (agentId: string) => {
};

// workspace usage options
export interface WorkspaceUsageOptions {
interface WorkspaceUsageOptions {
usageApp: UsageAppName;
connectionStatus: ConnectionStatus;
workspaceId: string | undefined;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/ActiveUserChart/ActiveUserChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const chartConfig = {
color: "hsl(var(--highlight-purple))",
},
} satisfies ChartConfig;
export interface ActiveUserChartProps {
interface ActiveUserChartProps {
data: { date: string; amount: number }[];
}

Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Avatar/AvatarData.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Avatar } from "components/Avatar/Avatar";
import type { FC, ReactNode } from "react";

export interface AvatarDataProps {
interface AvatarDataProps {
title: ReactNode;
subtitle?: ReactNode;
src?: string;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const badgeVariants = cva(
},
);

export interface BadgeProps
interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof badgeVariants> {
asChild?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/CodeExample/CodeExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { FC } from "react";
import { MONOSPACE_FONT_FAMILY } from "theme/constants";
import { CopyButton } from "../CopyButton/CopyButton";

export interface CodeExampleProps {
interface CodeExampleProps {
code: string;
secret?: boolean;
className?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const collapsibleSummaryVariants = cva(
},
);

export interface CollapsibleSummaryProps
interface CollapsibleSummaryProps
extends VariantProps<typeof collapsibleSummaryVariants> {
/**
* The label to display for the collapsible section
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Conditionals/ChooseOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
type ReactNode,
} from "react";

export interface CondProps {
interface CondProps {
condition?: boolean;
children?: ReactNode;
}
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type FC, type FormEvent, useId, useState } from "react";
import { Stack } from "../../Stack/Stack";
import { ConfirmDialog } from "../ConfirmDialog/ConfirmDialog";

export interface DeleteDialogProps {
interface DeleteDialogProps {
isOpen: boolean;
onConfirm: () => void;
onCancel: () => void;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Expander/Expander.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Link from "@mui/material/Link";
import { DropdownArrow } from "components/DropdownArrow/DropdownArrow";
import type { FC, ReactNode } from "react";

export interface ExpanderProps {
interface ExpanderProps {
expanded: boolean;
setExpanded: (val: boolean) => void;
children?: ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/FileUpload/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useClickable } from "hooks/useClickable";
import { CloudUploadIcon, FolderIcon, TrashIcon } from "lucide-react";
import { type DragEvent, type FC, type ReactNode, useRef } from "react";

export interface FileUploadProps {
interface FileUploadProps {
isUploading: boolean;
onUpload: (file: File) => void;
onRemove?: () => void;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Filter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ChevronDownIcon } from "lucide-react";
import { type FC, type ReactNode, useEffect, useRef, useState } from "react";
import type { useSearchParams } from "react-router-dom";

export type PresetFilter = {
type PresetFilter = {
name: string;
query: string;
};
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Filter/SelectFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type SelectFilterOption = {
value: string;
};

export type SelectFilterProps = {
type SelectFilterProps = {
options: SelectFilterOption[] | undefined;
selectedOption?: SelectFilterOption;
// Used to add a accessibility label to the select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from "components/PageHeader/PageHeader";
import type { FC, ReactNode } from "react";

export interface FullPageHorizontalFormProps {
interface FullPageHorizontalFormProps {
title: string;
detail?: ReactNode;
onCancel?: () => void;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/GlobalSnackbar/EnterpriseSnackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { FC } from "react";

type EnterpriseSnackbarVariant = "error" | "info" | "success";

export interface EnterpriseSnackbarProps extends MuiSnackbarProps {
interface EnterpriseSnackbarProps extends MuiSnackbarProps {
/** Called when the snackbar should close, either from timeout or clicking close */
onClose: () => void;
/** Variant of snackbar, for theming */
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const linkVariants = cva(
},
);

export interface LinkProps
interface LinkProps
extends React.AnchorHTMLAttributes<HTMLAnchorElement>,
VariantProps<typeof linkVariants> {
asChild?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Logs/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { type Line, LogLine, LogLinePrefix } from "./LogLine";

export const DEFAULT_LOG_LINE_SIDE_PADDING = 24;

export interface LogsProps {
interface LogsProps {
lines: Line[];
hideTimestamps?: boolean;
className?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ interface MultiSelectComboboxProps {
hideClearAllButton?: boolean;
}

export interface MultiSelectComboboxRef {
interface MultiSelectComboboxRef {
selectedValue: Option[];
input: HTMLInputElement;
focus: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { AvatarData } from "components/Avatar/AvatarData";
import { type ComponentProps, type FC, useEffect, useState } from "react";
import { useQuery } from "react-query";

export type OrganizationAutocompleteProps = {
type OrganizationAutocompleteProps = {
onChange: (organization: Organization | null) => void;
label?: string;
className?: string;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/PageHeader/PageHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC, PropsWithChildren, ReactNode } from "react";
import { Stack } from "../Stack/Stack";

export interface PageHeaderProps {
interface PageHeaderProps {
actions?: ReactNode;
className?: string;
children?: ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Paywall/Paywall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Stack } from "components/Stack/Stack";
import { CircleCheckBigIcon } from "lucide-react";
import type { FC, ReactNode } from "react";

export interface PaywallProps {
interface PaywallProps {
message: string;
description?: ReactNode;
documentationLink?: string;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Paywall/PopoverPaywall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Stack } from "components/Stack/Stack";
import { CircleCheckBigIcon } from "lucide-react";
import type { FC, ReactNode } from "react";

export interface PopoverPaywallProps {
interface PopoverPaywallProps {
message: string;
description?: ReactNode;
documentationLink?: string;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Pill/Pill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "react";
import type { ThemeRole } from "theme/roles";

export type PillProps = HTMLAttributes<HTMLDivElement> & {
type PillProps = HTMLAttributes<HTMLDivElement> & {
icon?: ReactNode;
type?: ThemeRole;
size?: "md" | "lg";
Expand Down
7 changes: 2 additions & 5 deletions site/src/components/RichParameterInput/RichParameterInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const styles = {
}),
} satisfies Record<string, Interpolation<Theme>>;

export interface ParameterLabelProps {
interface ParameterLabelProps {
parameter: TemplateVersionParameter;
isPreset?: boolean;
}
Expand Down Expand Up @@ -191,10 +191,7 @@ const ParameterLabel: FC<ParameterLabelProps> = ({ parameter, isPreset }) => {

type Size = "medium" | "small";

export type RichParameterInputProps = Omit<
TextFieldProps,
"size" | "onChange"
> & {
type RichParameterInputProps = Omit<TextFieldProps, "size" | "onChange"> & {
parameter: TemplateVersionParameter;
parameterAutofill?: AutofillBuildParameter;
onChange: (value: string) => void;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/SelectMenu/SelectMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const SelectMenuTrigger = PopoverTrigger;

export const SelectMenuContent = PopoverContent;

export type SelectMenuButtonProps = ButtonProps & {
type SelectMenuButtonProps = ButtonProps & {
startIcon?: React.ReactNode;
};

Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Stack/Stack.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CSSObject } from "@emotion/react";
import { forwardRef } from "react";

export type StackProps = {
type StackProps = {
className?: string;
direction?: "column" | "row";
spacing?: number;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/TableEmpty/TableEmpty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "components/EmptyState/EmptyState";
import type { FC } from "react";

export type TableEmptyProps = EmptyStateProps;
type TableEmptyProps = EmptyStateProps;

export const TableEmpty: FC<TableEmptyProps> = (props) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/TagInput/TagInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Chip from "@mui/material/Chip";
import FormHelperText from "@mui/material/FormHelperText";
import { type FC, useId, useMemo } from "react";

export type TagInputProps = {
type TagInputProps = {
label: string;
id?: string;
values: string[];
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/Timeline/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const groupByDate = <TData,>(
return itemsByDate;
};

export interface TimelineProps<TData> {
interface TimelineProps<TData> {
items: readonly TData[];
getDate: GetDateFn<TData>;
row: (item: TData) => JSX.Element;
Expand Down
8 changes: 4 additions & 4 deletions site/src/components/UserAutocomplete/UserAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import { useQuery } from "react-query";
import { prepareQuery } from "utils/filters";

// The common properties between users and org members that we need.
export type SelectedUser = {
type SelectedUser = {
avatar_url?: string;
email: string;
username: string;
};

export type CommonAutocompleteProps<T extends SelectedUser> = {
type CommonAutocompleteProps<T extends SelectedUser> = {
className?: string;
label?: string;
onChange: (user: T | null) => void;
Expand All @@ -34,7 +34,7 @@ export type CommonAutocompleteProps<T extends SelectedUser> = {
value: T | null;
};

export type UserAutocompleteProps = CommonAutocompleteProps<User>;
type UserAutocompleteProps = CommonAutocompleteProps<User>;

export const UserAutocomplete: FC<UserAutocompleteProps> = (props) => {
const [filter, setFilter] = useState<string>();
Expand All @@ -58,7 +58,7 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = (props) => {
);
};

export type MemberAutocompleteProps =
type MemberAutocompleteProps =
CommonAutocompleteProps<OrganizationMemberWithUserData> & {
organizationId: string;
};
Expand Down
4 changes: 2 additions & 2 deletions site/src/hooks/useSearchParamsKey.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useSearchParams } from "react-router-dom";

export type UseSearchParamsKeyConfig = Readonly<{
type UseSearchParamsKeyConfig = Readonly<{
key: string;
searchParams?: URLSearchParams;
defaultValue?: string;
replace?: boolean;
}>;

export type UseSearchParamKeyResult = Readonly<{
type UseSearchParamKeyResult = Readonly<{
value: string;
setValue: (newValue: string) => void;
deleteValue: () => void;
Expand Down
2 changes: 1 addition & 1 deletion site/src/modules/apps/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const openAppInNewWindow = (href: string) => {
window.open(href, "_blank", "width=900,height=600");
};

export type GetAppHrefParams = {
type GetAppHrefParams = {
path: string;
host: string;
workspace: Workspace;
Expand Down
Loading
Loading