From 7a39b2c4ea6c4c718b9030f549871afde7909e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 24 Mar 2026 22:54:11 +0100 Subject: [PATCH] fix: change unreachable branch to never in FlattenedMessages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The last branch of the conditional is unreachable since TMessages[TKey] is constrained to string | AnyNestedMessages. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Fredrik Adelöw --- packages/frontend-plugin-api/src/translation/TranslationRef.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend-plugin-api/src/translation/TranslationRef.ts b/packages/frontend-plugin-api/src/translation/TranslationRef.ts index c621ec6d24..796c23114b 100644 --- a/packages/frontend-plugin-api/src/translation/TranslationRef.ts +++ b/packages/frontend-plugin-api/src/translation/TranslationRef.ts @@ -60,7 +60,7 @@ type FlattenedMessages = string}`]: TNested[TNestedKey]; } : never - : { [_ in TKey]: TMessages[TKey] }, // Other primitive values are passed through with the same key, + : never, // Unreachable: TMessages[TKey] is always string or AnyNestedMessages ) => void; // The `[keyof TMessages]` extracts the object values union from our flattened structure, still wrapped up in function parameters. // The `extends (_: infer TIntersection) => void` flips the union to an intersection, at which point we have the correct type.