@@ -1137,7 +1137,7 @@ function ListView(
parentPath={entry.parentPath}
isSelected={selectedFileIds.has(entry.file.id)}
isInWorkspace={
- activeWorkspaceFileIds?.has(entry.file.id as string) ?? false
+ activeWorkspaceFileIds?.has(entry.file.id) ?? false
}
selectedFileIds={selectedFileIds}
multiSelectActive={selectedFileIds.size >= 2}
@@ -1424,7 +1424,7 @@ function FileRow({
shiftKey: false,
ctrlKey: true,
metaKey: true,
- } as unknown as React.MouseEvent);
+ });
}}
onChange={() => {
/* handled by onClick */
@@ -1491,7 +1491,7 @@ function FileRow({
)}
-
+
{isInWorkspace && (
diff --git a/frontend/editor/src/core/components/filesPage/FileManagerView.tsx b/frontend/editor/src/core/components/filesPage/FileManagerView.tsx
index 36ffb9c4dc..4665784e79 100644
--- a/frontend/editor/src/core/components/filesPage/FileManagerView.tsx
+++ b/frontend/editor/src/core/components/filesPage/FileManagerView.tsx
@@ -474,7 +474,7 @@ export default function FileManagerView() {
if (idx >= 0 && lastIdx >= 0) {
const [a, b] = idx < lastIdx ? [idx, lastIdx] : [lastIdx, idx];
for (let i = a; i <= b; i += 1) {
- next.add(visibleFiles[i]!.id);
+ next.add(visibleFiles[i].id);
}
return next;
}
@@ -593,7 +593,7 @@ export default function FileManagerView() {
});
// Branch on requested stubs so already-active files still activate.
if (materialized.length === 1) {
- setActiveFileId(materialized[0]!.id);
+ setActiveFileId(materialized[0].id);
navActions.setWorkbench("viewer");
} else if (materialized.length > 1) {
navActions.setWorkbench("fileEditor");
@@ -1172,7 +1172,7 @@ export default function FileManagerView() {
else if (e.key === "End") next = TAB_DEFS.length - 1;
else return;
e.preventDefault();
- const target = TAB_DEFS[next]!;
+ const target = TAB_DEFS[next];
setCurrentTab(target.id);
focusTab(target.id);
}}
@@ -1602,7 +1602,7 @@ export default function FileManagerView() {
)
)
return;
- setViewMode(v as (typeof FILES_PAGE_VIEW_MODES)[number]);
+ setViewMode(v);
}}
aria-label={t("filesPage.viewMode.label", "View mode")}
options={[
diff --git a/frontend/editor/src/core/components/filesPage/VersionTimeline.tsx b/frontend/editor/src/core/components/filesPage/VersionTimeline.tsx
index 05c96685b2..f484f936ef 100644
--- a/frontend/editor/src/core/components/filesPage/VersionTimeline.tsx
+++ b/frontend/editor/src/core/components/filesPage/VersionTimeline.tsx
@@ -120,14 +120,14 @@ export function VersionTimeline({
};
const rows: Row[] = useMemo(() => {
if (!collapsible || showAllCollapsed) {
- return ordered.map((v) => ({ kind: "version", version: v }) as Row);
+ return ordered.map((v) => ({ kind: "version", version: v }));
}
const head = ordered
.slice(0, 3)
- .map((v) => ({ kind: "version", version: v }) as Row);
+ .map((v) => ({ kind: "version", version: v }));
const tail = ordered
.slice(-2)
- .map((v) => ({ kind: "version", version: v }) as Row);
+ .map((v) => ({ kind: "version", version: v }));
const hidden = ordered.length - 5;
return [...head, { kind: "ellipsis", hidden }, ...tail];
}, [collapsible, showAllCollapsed, ordered]);
diff --git a/frontend/editor/src/core/components/filesPage/folderTreeWidth.ts b/frontend/editor/src/core/components/filesPage/folderTreeWidth.ts
index 4aaf8099ec..a88b0e7f11 100644
--- a/frontend/editor/src/core/components/filesPage/folderTreeWidth.ts
+++ b/frontend/editor/src/core/components/filesPage/folderTreeWidth.ts
@@ -27,7 +27,7 @@ function depthOf(
let cursor: FolderRecord | undefined = folder;
while (cursor && cursor.parentFolderId) {
depth += 1;
- cursor = byId.get(cursor.parentFolderId as string);
+ cursor = byId.get(cursor.parentFolderId);
if (depth > 50) break;
}
return depth;
diff --git a/frontend/editor/src/core/components/mobileSign/MobileDrawCanvas.tsx b/frontend/editor/src/core/components/mobileSign/MobileDrawCanvas.tsx
index 38c2be8e6c..8461727240 100644
--- a/frontend/editor/src/core/components/mobileSign/MobileDrawCanvas.tsx
+++ b/frontend/editor/src/core/components/mobileSign/MobileDrawCanvas.tsx
@@ -139,9 +139,9 @@ export const MobileDrawCanvas = forwardRef<
// where the per-frame synthetic event alone would drop curvature.
const events =
"getCoalescedEvents" in e.nativeEvent
- ? (e.nativeEvent as PointerEvent).getCoalescedEvents()
+ ? e.nativeEvent.getCoalescedEvents()
: [e.nativeEvent as PointerEvent];
- const rect = (e.currentTarget as HTMLCanvasElement).getBoundingClientRect();
+ const rect = e.currentTarget.getBoundingClientRect();
for (const ev of events) {
stroke.points.push({
x: ev.clientX - rect.left,
diff --git a/frontend/editor/src/core/components/onboarding/Onboarding.tsx b/frontend/editor/src/core/components/onboarding/Onboarding.tsx
index e95aaf57aa..3ce2e2701f 100644
--- a/frontend/editor/src/core/components/onboarding/Onboarding.tsx
+++ b/frontend/editor/src/core/components/onboarding/Onboarding.tsx
@@ -20,7 +20,6 @@ import {
import { useOnboardingDownload } from "@app/components/onboarding/useOnboardingDownload";
import {
SLIDE_DEFINITIONS,
- type SlideId,
type ButtonAction,
} from "@app/components/onboarding/onboardingFlowConfig";
import ToolPanelModePrompt from "@app/components/tools/ToolPanelModePrompt";
@@ -322,7 +321,7 @@ export default function Onboarding() {
) {
return null;
}
- return SLIDE_DEFINITIONS[currentStep.slideId as SlideId];
+ return SLIDE_DEFINITIONS[currentStep.slideId];
}, [currentStep]);
const currentSlideContent = useMemo(() => {
diff --git a/frontend/editor/src/core/components/pageEditor/commands/pageCommands.ts b/frontend/editor/src/core/components/pageEditor/commands/pageCommands.ts
index db9385fc37..2ce10b929c 100644
--- a/frontend/editor/src/core/components/pageEditor/commands/pageCommands.ts
+++ b/frontend/editor/src/core/components/pageEditor/commands/pageCommands.ts
@@ -244,7 +244,7 @@ export class ReorderPagesCommand extends DOMCommand {
.map((pageNum) =>
currentDoc.pages.find((p) => p.pageNumber === pageNum),
)
- .filter((page) => page !== undefined) as PDFPage[];
+ .filter((page) => page !== undefined);
const remainingPages = currentDoc.pages.filter(
(page) => !this.selectedPages!.includes(page.pageNumber),
diff --git a/frontend/editor/src/core/components/shared/superSearch/SuperSearch.test.tsx b/frontend/editor/src/core/components/shared/superSearch/SuperSearch.test.tsx
index f77984f090..931c87197f 100644
--- a/frontend/editor/src/core/components/shared/superSearch/SuperSearch.test.tsx
+++ b/frontend/editor/src/core/components/shared/superSearch/SuperSearch.test.tsx
@@ -84,7 +84,7 @@ function renderSearch(
,
@@ -103,7 +103,7 @@ describe("SuperSearch", () => {
width: 320,
height: 40,
toJSON: () => "",
- } as DOMRect);
+ });
Object.defineProperty(Element.prototype, "scrollIntoView", {
value: vi.fn(),
diff --git a/frontend/editor/src/core/components/shared/wetSignature/SignatureTypeSelector.tsx b/frontend/editor/src/core/components/shared/wetSignature/SignatureTypeSelector.tsx
index 7b4950f4aa..5cc14fcf3c 100644
--- a/frontend/editor/src/core/components/shared/wetSignature/SignatureTypeSelector.tsx
+++ b/frontend/editor/src/core/components/shared/wetSignature/SignatureTypeSelector.tsx
@@ -19,7 +19,7 @@ export const SignatureTypeSelector: React.FC = ({
return (
onChange(val as SignatureType)}
+ onChange={(val) => onChange(val)}
options={[
{
value: "draw",
diff --git a/frontend/editor/src/core/components/toast/ToastContext.tsx b/frontend/editor/src/core/components/toast/ToastContext.tsx
index a300dc1791..4fcc6d8b10 100644
--- a/frontend/editor/src/core/components/toast/ToastContext.tsx
+++ b/frontend/editor/src/core/components/toast/ToastContext.tsx
@@ -93,7 +93,7 @@ export function ToastProvider({ children }: { children: React.ReactNode }) {
? true
: false,
createdAt: Date.now(),
- } as ToastInstance;
+ };
setToasts((prev) => {
// Coalesce duplicates by alertType + title + body text if no explicit id was provided
if (!options.id) {
@@ -138,7 +138,7 @@ export function ToastProvider({ children }: { children: React.ReactNode }) {
...t,
...updates,
progress,
- } as ToastInstance;
+ };
// Detect completion but do not auto-flip to success.
// Callers (e.g., compare workbench) explicitly set alertType when done.
@@ -197,9 +197,8 @@ export function ToastProvider({ children }: { children: React.ReactNode }) {
),
);
};
- window.addEventListener("toast:toggle", handler as EventListener);
- return () =>
- window.removeEventListener("toast:toggle", handler as EventListener);
+ window.addEventListener("toast:toggle", handler);
+ return () => window.removeEventListener("toast:toggle", handler);
}, []);
return (
diff --git a/frontend/editor/src/core/components/tools/FullscreenToolList.tsx b/frontend/editor/src/core/components/tools/FullscreenToolList.tsx
index 5296e21299..85a306c476 100644
--- a/frontend/editor/src/core/components/tools/FullscreenToolList.tsx
+++ b/frontend/editor/src/core/components/tools/FullscreenToolList.tsx
@@ -108,7 +108,7 @@ const FullscreenToolList = ({
window.open(tool.link, "_blank", "noopener,noreferrer");
return;
}
- onSelect(id as ToolId);
+ onSelect(id);
};
if (showDescriptions) {
@@ -274,15 +274,11 @@ const FullscreenToolList = ({
{showDescriptions ? (
- {tools.map(({ id, tool }) =>
- renderToolItem(id as ToolId, tool),
- )}
+ {tools.map(({ id, tool }) => renderToolItem(id, tool))}
) : (
- {tools.map(({ id, tool }) =>
- renderToolItem(id as ToolId, tool),
- )}
+ {tools.map(({ id, tool }) => renderToolItem(id, tool))}
)}
diff --git a/frontend/editor/src/core/components/tools/RightSidebar.tsx b/frontend/editor/src/core/components/tools/RightSidebar.tsx
index a4bdbced7e..d66d30c442 100644
--- a/frontend/editor/src/core/components/tools/RightSidebar.tsx
+++ b/frontend/editor/src/core/components/tools/RightSidebar.tsx
@@ -108,7 +108,7 @@ export default function RightSidebar() {
const activeTool: ToolRegistryEntry | null =
inToolView && selectedToolKey
- ? (toolRegistry[selectedToolKey as ToolId] ?? null)
+ ? (toolRegistry[selectedToolKey] ?? null)
: null;
const expandedWidth = "18.5rem";
@@ -131,7 +131,7 @@ export default function RightSidebar() {
const items: Array<{ id: ToolId; tool: ToolRegistryEntry }> = [];
collapsedQuickSection.subcategories.forEach((sc: SubcategoryGroup) =>
sc.tools.forEach((entry) =>
- items.push({ id: entry.id as ToolId, tool: entry.tool }),
+ items.push({ id: entry.id, tool: entry.tool }),
),
);
return items;
diff --git a/frontend/editor/src/core/components/tools/ToolRenderer.tsx b/frontend/editor/src/core/components/tools/ToolRenderer.tsx
index 1429231ab7..4c99afbca2 100644
--- a/frontend/editor/src/core/components/tools/ToolRenderer.tsx
+++ b/frontend/editor/src/core/components/tools/ToolRenderer.tsx
@@ -19,9 +19,7 @@ const ToolRenderer = ({
// Get the tool from context (instead of direct hook call)
const { toolRegistry } = useToolWorkflow();
const selectedTool =
- selectedToolKey in toolRegistry
- ? toolRegistry[selectedToolKey as ToolId]
- : undefined;
+ selectedToolKey in toolRegistry ? toolRegistry[selectedToolKey] : undefined;
// Handle tools that only work in workbenches (read, multiTool)
if (selectedTool && !selectedTool.component && selectedTool.workbench) {
diff --git a/frontend/editor/src/core/components/tools/addPageNumbers/PageNumberPreview.tsx b/frontend/editor/src/core/components/tools/addPageNumbers/PageNumberPreview.tsx
index 6e35b286a9..9991c4b849 100644
--- a/frontend/editor/src/core/components/tools/addPageNumbers/PageNumberPreview.tsx
+++ b/frontend/editor/src/core/components/tools/addPageNumbers/PageNumberPreview.tsx
@@ -261,12 +261,7 @@ export default function PageNumberPreview({
variant="tertiary"
key={idx}
className={`${styles.gridTile} ${selected || hoverTile === idx ? styles.gridTileSelected : ""} ${hoverTile === idx ? styles.gridTileHovered : ""}`}
- onClick={() =>
- onParameterChange(
- "position",
- idx as AddPageNumbersParameters["position"],
- )
- }
+ onClick={() => onParameterChange("position", idx)}
onMouseEnter={() => setHoverTile(idx)}
onMouseLeave={() => setHoverTile(null)}
style={{
diff --git a/frontend/editor/src/core/components/tools/addWatermark/WatermarkStyleSettings.tsx b/frontend/editor/src/core/components/tools/addWatermark/WatermarkStyleSettings.tsx
index 1d9dad2995..c9ce1ca1bd 100644
--- a/frontend/editor/src/core/components/tools/addWatermark/WatermarkStyleSettings.tsx
+++ b/frontend/editor/src/core/components/tools/addWatermark/WatermarkStyleSettings.tsx
@@ -36,9 +36,7 @@ const WatermarkStyleSettings = ({
onChange={(value) =>
onParameterChange(
"rotation",
- typeof value === "number"
- ? value
- : parseInt(value as string, 10) || 0,
+ typeof value === "number" ? value : parseInt(value, 10) || 0,
)
}
min={-360}
@@ -55,9 +53,7 @@ const WatermarkStyleSettings = ({
onChange={(value) =>
onParameterChange(
"opacity",
- typeof value === "number"
- ? value
- : parseInt(value as string, 10) || 50,
+ typeof value === "number" ? value : parseInt(value, 10) || 50,
)
}
min={0}
@@ -77,9 +73,7 @@ const WatermarkStyleSettings = ({
onChange={(value) =>
onParameterChange(
"widthSpacer",
- typeof value === "number"
- ? value
- : parseInt(value as string, 10) || 50,
+ typeof value === "number" ? value : parseInt(value, 10) || 50,
)
}
min={0}
@@ -96,9 +90,7 @@ const WatermarkStyleSettings = ({
onChange={(value) =>
onParameterChange(
"heightSpacer",
- typeof value === "number"
- ? value
- : parseInt(value as string, 10) || 50,
+ typeof value === "number" ? value : parseInt(value, 10) || 50,
)
}
min={0}
diff --git a/frontend/editor/src/core/components/tools/adjustPageScale/AdjustPageScaleSettings.tsx b/frontend/editor/src/core/components/tools/adjustPageScale/AdjustPageScaleSettings.tsx
index aeb874b58e..e2bf0a8466 100644
--- a/frontend/editor/src/core/components/tools/adjustPageScale/AdjustPageScaleSettings.tsx
+++ b/frontend/editor/src/core/components/tools/adjustPageScale/AdjustPageScaleSettings.tsx
@@ -103,9 +103,7 @@ const AdjustPageScaleSettings = ({
- onParameterChange("orientation", value as Orientation)
- }
+ onChange={(value) => onParameterChange("orientation", value)}
options={orientationOptions}
fullWidth
/>
diff --git a/frontend/editor/src/core/components/tools/certSign/WetSignatureInput.tsx b/frontend/editor/src/core/components/tools/certSign/WetSignatureInput.tsx
index f87fda19fe..af1913baa7 100644
--- a/frontend/editor/src/core/components/tools/certSign/WetSignatureInput.tsx
+++ b/frontend/editor/src/core/components/tools/certSign/WetSignatureInput.tsx
@@ -238,9 +238,7 @@ const WetSignatureInput = ({
- handleSignatureTypeChange(value as SignatureType)
- }
+ onChange={(value) => handleSignatureTypeChange(value)}
options={[
{ label: t("sign.type.canvas", "Draw"), value: "canvas", disabled },
{ label: t("sign.type.image", "Upload"), value: "image", disabled },
diff --git a/frontend/editor/src/core/components/tools/compare/ComparePixelWorkbenchView.tsx b/frontend/editor/src/core/components/tools/compare/ComparePixelWorkbenchView.tsx
index d45ccd75a0..35b3a7e0f4 100644
--- a/frontend/editor/src/core/components/tools/compare/ComparePixelWorkbenchView.tsx
+++ b/frontend/editor/src/core/components/tools/compare/ComparePixelWorkbenchView.tsx
@@ -170,7 +170,7 @@ const ComparePixelWorkbenchView = ({
setViewMode(value as PixelViewMode)}
+ onChange={(value) => setViewMode(value)}
options={[
{
value: "side-by-side",
diff --git a/frontend/editor/src/core/components/tools/compare/CompareWorkbenchView.tsx b/frontend/editor/src/core/components/tools/compare/CompareWorkbenchView.tsx
index 1df0f1c14a..5470e3ac8c 100644
--- a/frontend/editor/src/core/components/tools/compare/CompareWorkbenchView.tsx
+++ b/frontend/editor/src/core/components/tools/compare/CompareWorkbenchView.tsx
@@ -28,7 +28,6 @@ import {
updateToastProgress,
dismissToast,
} from "@app/components/toast";
-import type { ToastLocation } from "@app/components/toast/types";
interface CompareWorkbenchViewProps {
data: CompareWorkbenchData | null;
@@ -323,7 +322,7 @@ const CompareTextWorkbenchView = ({ data }: CompareTextWorkbenchViewProps) => {
"At least one of these PDFs are very large, scrolling won't be smooth until the rendering is complete",
),
body: `${countsText} ${t("compare.rendering.pagesRendered", "pages rendered")}`,
- location: "bottom-right" as ToastLocation,
+ location: "bottom-right",
isPersistentPopup: true,
durationMs: 0,
expandable: false,
@@ -337,7 +336,7 @@ const CompareTextWorkbenchView = ({ data }: CompareTextWorkbenchViewProps) => {
"At least one of these PDFs are very large, scrolling won't be smooth until the rendering is complete",
),
body: `${countsText} ${t("compare.rendering.pagesRendered", "pages rendered")}`,
- location: "bottom-right" as ToastLocation,
+ location: "bottom-right",
isPersistentPopup: true,
alertType: "neutral", // ensure it stays neutral until completion
});
@@ -452,7 +451,7 @@ const CompareTextWorkbenchView = ({ data }: CompareTextWorkbenchViewProps) => {
"compare.rendering.pageNotReadyBody",
"Some pages are still rendering. Navigation will snap once they are ready.",
),
- location: "bottom-right" as ToastLocation,
+ location: "bottom-right",
isPersistentPopup: false,
durationMs: 2500,
});
diff --git a/frontend/editor/src/core/components/tools/compare/compare.ts b/frontend/editor/src/core/components/tools/compare/compare.ts
index 30d0c42304..b157745307 100644
--- a/frontend/editor/src/core/components/tools/compare/compare.ts
+++ b/frontend/editor/src/core/components/tools/compare/compare.ts
@@ -186,7 +186,7 @@ export const getFileFromSelection = (
): StirlingFile | null => {
if (explicit) return explicit;
if (!fileId) return null;
- return (selectors.getFile(fileId) as StirlingFile | undefined | null) ?? null;
+ return selectors.getFile(fileId) ?? null;
};
export const getStubFromSelection = (
diff --git a/frontend/editor/src/core/components/tools/compare/hooks/useCompareChangeNavigation.ts b/frontend/editor/src/core/components/tools/compare/hooks/useCompareChangeNavigation.ts
index d7d8e95635..e56187f5f2 100644
--- a/frontend/editor/src/core/components/tools/compare/hooks/useCompareChangeNavigation.ts
+++ b/frontend/editor/src/core/components/tools/compare/hooks/useCompareChangeNavigation.ts
@@ -79,7 +79,7 @@ export const useCompareChangeNavigation = (
const inner = anchor.closest(
".compare-diff-page__inner",
) as HTMLElement | null;
- const topPercent = parseFloat((anchor as HTMLElement).style.top || "0");
+ const topPercent = parseFloat(anchor.style.top || "0");
if (pageEl && inner && !Number.isNaN(topPercent)) {
const innerRect = inner.getBoundingClientRect();
const innerHeight = Math.max(1, innerRect.height);
@@ -156,9 +156,7 @@ export const useCompareChangeNavigation = (
".compare-diff-page",
) as HTMLElement | null;
const pageNumAttr = pageEl?.getAttribute("data-page-number");
- const topPercent = parseFloat(
- (anchor as HTMLElement).style.top || "0",
- );
+ const topPercent = parseFloat(anchor.style.top || "0");
if (pageNumAttr) {
const peerPageEl = peer.querySelector(
`.compare-diff-page[data-page-number="${pageNumAttr}"]`,
diff --git a/frontend/editor/src/core/components/tools/compare/hooks/useComparePanZoom.ts b/frontend/editor/src/core/components/tools/compare/hooks/useComparePanZoom.ts
index bac47de952..d44c55e1ec 100644
--- a/frontend/editor/src/core/components/tools/compare/hooks/useComparePanZoom.ts
+++ b/frontend/editor/src/core/components/tools/compare/hooks/useComparePanZoom.ts
@@ -323,7 +323,7 @@ export const useComparePanZoom = ({
const pages = getPagesForPane(pane);
const rotation = pages[0]?.rotation ?? 0;
const normalized = ((rotation % 360) + 360) % 360;
- return normalized as 0 | 90 | 180 | 270 | number;
+ return normalized;
},
[getPagesForPane],
);
@@ -656,7 +656,7 @@ export const useComparePanZoom = ({
};
edgeOverscrollRef.current[pane] = 0;
lastActivePaneRef.current = pane;
- (container as HTMLDivElement).style.cursor = "grabbing";
+ container.style.cursor = "grabbing";
},
[isPanMode, baseZoom, comparisonZoom, basePan, comparisonPan],
);
@@ -700,11 +700,7 @@ export const useComparePanZoom = ({
: comparisonScrollRef.current;
if (sourceEl) {
const zoom = drag.source === "base" ? baseZoom : comparisonZoom;
- (sourceEl as HTMLDivElement).style.cursor = isPanMode
- ? zoom > 1
- ? "grab"
- : "auto"
- : "";
+ sourceEl.style.cursor = isPanMode ? (zoom > 1 ? "grab" : "auto") : "";
}
panDragRef.current.active = false;
panDragRef.current.source = null;
diff --git a/frontend/editor/src/core/components/tools/compare/hooks/useCompareWorkbenchBarButtons.tsx b/frontend/editor/src/core/components/tools/compare/hooks/useCompareWorkbenchBarButtons.tsx
index 3ddbbbf3da..076ac877d5 100644
--- a/frontend/editor/src/core/components/tools/compare/hooks/useCompareWorkbenchBarButtons.tsx
+++ b/frontend/editor/src/core/components/tools/compare/hooks/useCompareWorkbenchBarButtons.tsx
@@ -3,7 +3,6 @@ import type React from "react";
import { useTranslation } from "react-i18next";
import LocalIcon from "@app/components/shared/LocalIcon";
import { alert } from "@app/components/toast";
-import type { ToastLocation } from "@app/components/toast/types";
import type { WorkbenchBarButtonWithAction } from "@app/hooks/useWorkbenchBarButtons";
import { useIsMobile } from "@app/hooks/useIsMobile";
@@ -179,7 +178,7 @@ export const useCompareWorkbenchBarButtons = ({
"Tip: Arrow Up/Down scroll both panes when unlinked is off.",
),
durationMs: 5000,
- location: "bottom-center" as ToastLocation,
+ location: "bottom-center",
expandable: false,
});
}
diff --git a/frontend/editor/src/core/components/tools/fullscreen/DetailedToolItem.stories.tsx b/frontend/editor/src/core/components/tools/fullscreen/DetailedToolItem.stories.tsx
index cd443e248a..901824aaf6 100644
--- a/frontend/editor/src/core/components/tools/fullscreen/DetailedToolItem.stories.tsx
+++ b/frontend/editor/src/core/components/tools/fullscreen/DetailedToolItem.stories.tsx
@@ -94,10 +94,10 @@ type Story = StoryObj;
/** An available tool rendered in its default, unselected state. */
export const Default: Story = {
- render: () => ,
+ render: () => ,
};
/** The active tool in the panel — highlighted selected state. */
export const Selected: Story = {
- render: () => ,
+ render: () => ,
};
diff --git a/frontend/editor/src/core/components/tools/overlayPdfs/OverlayPdfsSettings.tsx b/frontend/editor/src/core/components/tools/overlayPdfs/OverlayPdfsSettings.tsx
index e7246bb4e3..8df455182e 100644
--- a/frontend/editor/src/core/components/tools/overlayPdfs/OverlayPdfsSettings.tsx
+++ b/frontend/editor/src/core/components/tools/overlayPdfs/OverlayPdfsSettings.tsx
@@ -137,7 +137,7 @@ export default function OverlayPdfsSettings({
- onParameterChange("overlayPosition", (v === "1" ? 1 : 0) as 0 | 1)
+ onParameterChange("overlayPosition", v === "1" ? 1 : 0)
}
options={[
{
diff --git a/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorSidebar.tsx b/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorSidebar.tsx
index 1892aaa7f3..a0ce9fc362 100644
--- a/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorSidebar.tsx
+++ b/frontend/editor/src/core/components/tools/pdfTextEditor/PdfTextEditorSidebar.tsx
@@ -279,9 +279,7 @@ const PdfTextEditorSidebar = ({ data }: PdfTextEditorSidebarProps) => {
- handleModeChangeRequest(value as GroupingMode)
- }
+ onChange={(value) => handleModeChangeRequest(value)}
options={[
{
label: t("pdfTextEditor.groupingMode.auto", "Auto"),
diff --git a/frontend/editor/src/core/components/tools/shared/ReviewToolStep.tsx b/frontend/editor/src/core/components/tools/shared/ReviewToolStep.tsx
index 7918bac7ca..ef596c2a0d 100644
--- a/frontend/editor/src/core/components/tools/shared/ReviewToolStep.tsx
+++ b/frontend/editor/src/core/components/tools/shared/ReviewToolStep.tsx
@@ -12,7 +12,6 @@ import { useFileActionTerminology } from "@app/hooks/useFileActionTerminology";
import { useFileActionIcons } from "@app/hooks/useFileActionIcons";
import { saveOperationResults } from "@app/services/operationResultsSaveService";
import { useFileActions, useFileSelectors } from "@app/contexts/FileContext";
-import { FileId } from "@app/types/fileContext";
import i18n from "@app/i18n";
export interface ReviewToolStepProps {
@@ -65,11 +64,11 @@ function ReviewStepContent({
downloadFilename: operation.downloadFilename || "download",
downloadLocalPath: operation.downloadLocalPath,
outputFileIds: operation.outputFileIds,
- getFile: (fileId) => selectors.getFile(fileId as FileId),
- getStub: (fileId) => selectors.getStirlingFileStub(fileId as FileId),
+ getFile: (fileId) => selectors.getFile(fileId),
+ getStub: (fileId) => selectors.getStirlingFileStub(fileId),
markSaved: (fileId, savedPath) => {
- const stub = selectors.getStirlingFileStub(fileId as FileId);
- fileActions.updateStirlingFileStub(fileId as FileId, {
+ const stub = selectors.getStirlingFileStub(fileId);
+ fileActions.updateStirlingFileStub(fileId, {
localFilePath: stub?.localFilePath ?? savedPath,
isDirty: false,
});
diff --git a/frontend/editor/src/core/components/tools/showJS/utils.ts b/frontend/editor/src/core/components/tools/showJS/utils.ts
index e946ec271e..7c6530c21b 100644
--- a/frontend/editor/src/core/components/tools/showJS/utils.ts
+++ b/frontend/editor/src/core/components/tools/showJS/utils.ts
@@ -186,7 +186,7 @@ export function tokenizeToLines(
}
if (isStringDelimiter) {
- startString(ch as '"' | "'" | "`");
+ startString(ch);
continue;
}
@@ -312,7 +312,7 @@ export function computeBlocks(
continue;
}
if (isStringDelimiter) {
- startString(ch as '"' | "'" | "`");
+ startString(ch);
continue;
}
if (isOpenBrace) {
diff --git a/frontend/editor/src/core/components/tools/sign/MobileSignatureModal.test.tsx b/frontend/editor/src/core/components/tools/sign/MobileSignatureModal.test.tsx
index c8607d55c4..4f68e7c68c 100644
--- a/frontend/editor/src/core/components/tools/sign/MobileSignatureModal.test.tsx
+++ b/frontend/editor/src/core/components/tools/sign/MobileSignatureModal.test.tsx
@@ -52,9 +52,9 @@ function primeSession(
mockedApi.post.mockResolvedValue({
status: 200,
data: SESSION_INFO,
- } as never);
- mockedApi.delete.mockResolvedValue({ status: 200 } as never);
- mockedApi.get.mockImplementation(((url: string, config?: unknown) => {
+ });
+ mockedApi.delete.mockResolvedValue({ status: 200 });
+ mockedApi.get.mockImplementation((url: string, config?: unknown) => {
if (url.includes("/files/")) {
return Promise.resolve({ status: 200, data: { files } } as never);
}
@@ -70,7 +70,7 @@ function primeSession(
} as never);
}
return Promise.reject(new Error(`unexpected GET ${url}`));
- }) as never);
+ });
}
function renderModal(
diff --git a/frontend/editor/src/core/components/tools/sign/SignSettings.tsx b/frontend/editor/src/core/components/tools/sign/SignSettings.tsx
index 4aa9f8ffd3..1d78343c79 100644
--- a/frontend/editor/src/core/components/tools/sign/SignSettings.tsx
+++ b/frontend/editor/src/core/components/tools/sign/SignSettings.tsx
@@ -519,7 +519,7 @@ const SignSettings = ({
return;
}
const nextSource = allowedSignatureSources.includes(
- parameters.signatureType as SignatureSource,
+ parameters.signatureType,
)
? (parameters.signatureType as SignatureSource)
: effectiveDefaultSource;
@@ -1282,9 +1282,7 @@ const SignSettings = ({
- handleSignatureSourceChange(value as SignatureSource)
- }
+ onChange={(value) => handleSignatureSourceChange(value)}
options={sourceOptions}
/>
)}
diff --git a/frontend/editor/src/core/components/tools/toolPicker/ToolButton.tsx b/frontend/editor/src/core/components/tools/toolPicker/ToolButton.tsx
index 4792fd721a..8daf2cb019 100644
--- a/frontend/editor/src/core/components/tools/toolPicker/ToolButton.tsx
+++ b/frontend/editor/src/core/components/tools/toolPicker/ToolButton.tsx
@@ -74,7 +74,7 @@ const ToolButton: React.FC = ({
const { hotkeys } = useHotkeys();
const binding = hotkeys[id];
const { getToolNavigation } = useToolNavigation();
- const fav = isFavorite(id as ToolId);
+ const fav = isFavorite(id);
// Check if this tool will route to SaaS backend (desktop only)
const rawEndpoint = tool.operationConfig?.endpoint;
@@ -308,7 +308,7 @@ const ToolButton: React.FC = ({
hasStars && !visuallyUnavailable ? (
toggleFavorite(id as ToolId)}
+ onToggle={() => toggleFavorite(id)}
className="tool-button-star"
size="xs"
/>
diff --git a/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureResults.tsx b/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureResults.tsx
index 22020ac6dc..23a9d9e949 100644
--- a/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureResults.tsx
+++ b/frontend/editor/src/core/components/tools/validateSignature/ValidateSignatureResults.tsx
@@ -294,7 +294,7 @@ const ValidateSignatureResults = ({
setSelectedType(v as "pdf" | "csv" | "json")}
+ onChange={(v) => setSelectedType(v)}
options={downloadTypeOptions}
/>
{v.endpoints.map((e) => (