fix(frontend-plugin-api): fix FlattenedMessages type depth for TypeScript 6

Restructure the FlattenedMessages conditional type to check
`TMessages[TKey] extends string` directly instead of using an
intermediate `infer TValue` pattern, which caused excessive type
instantiation depth in TypeScript 6.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
This commit is contained in:
Fredrik Adelöw
2026-03-24 22:30:56 +01:00
parent bdd21b9f9c
commit ddc5247f67
2 changed files with 15 additions and 10 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-plugin-api': patch
---
Fixed `FlattenedMessages` type to avoid excessive type instantiation depth in TypeScript 6 when using `createTranslationRef` with the `translations` option.