From a724f862b8f318ca575e71c3a5d05f78137522d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Tue, 26 May 2026 01:02:49 +0200 Subject: [PATCH] chore(ts): drop two more redundant casts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - RouteMapThumbnail.client.tsx: `{ type: 'Feature', ... } as unknown as GeoJsonObject` → `as GeoJsonObject`. The literal already satisfies the type; the unknown bridge was unnecessary. - use-yjs.ts:102: keep the coercion (y-websocket's `.on()` signature doesn't include the legacy `"synced"` event even though the runtime still fires it), but document why with a comment so future readers don't try to drop it. --- apps/journal/app/components/RouteMapThumbnail.client.tsx | 2 +- apps/planner/app/lib/use-yjs.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/journal/app/components/RouteMapThumbnail.client.tsx b/apps/journal/app/components/RouteMapThumbnail.client.tsx index 3ea476d..5a4591d 100644 --- a/apps/journal/app/components/RouteMapThumbnail.client.tsx +++ b/apps/journal/app/components/RouteMapThumbnail.client.tsx @@ -142,7 +142,7 @@ function DayColoredRoute({ data, dayBreaks, highlightedDay }: { data: GeoJsonObj type: "Feature", geometry: { type: "LineString", coordinates: seg.coords }, properties: {}, - } as unknown as GeoJsonObject; + } as GeoJsonObject; return ( void): void }).on("synced", () => { // Only add if the doc is empty (avoid duplicating on reconnect) if (waypoints.length === 0 && !initializedWaypoints.current) {