-
|
Related to question #174 (comment) but I'm not sure how well you can see answers after the question is marked as answered, so here for clarity a new one: When using bracket notation with the i18nObject, like for example |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
@nkoehring you are probably looking for something like this: import type { Translations } from '$i18n/i18n-types'
const key = 'something' as keyof Translations['foo']
LL.foo[key]() |
Beta Was this translation helpful? Give feedback.
-
|
Important to note: If namespaces are used, the type should be import type { Translations } from '$i18n/i18n-types'
const key = 'something' as keyof Translations['foo']
LL.foo[key]() |
Beta Was this translation helpful? Give feedback.
@nkoehring you are probably looking for something like this: