You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
need some help. I am unsure how to get the correct generated type of my configuration. I would like to pass the object i get via useI18n to a function and i would like to define the correct parameter type of ComposerTranslation. Because ComposerTranslation itself is not enough for TS
i18n: {// ToDo when translations are available change it!detectBrowserLanguage: false,strategy: 'no_prefix',defaultLocale: 'en',lazy: true,locales: [{code: 'en',iso: 'en-US',file: 'en.json'},{code: 'de',iso: 'de-DE',file: 'de.json'}]},
if i import t from useI18n i get the following type definition
but i am unsure how to import this type into a TS file with my function definition. If anybody knows where it gets generated and get it from, it would be helpful thx!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
need some help. I am unsure how to get the correct generated type of my configuration. I would like to pass the object i get via
useI18nto a function and i would like to define the correct parameter type ofComposerTranslation. Because ComposerTranslation itself is not enough for TSif i import
tfromuseI18ni get the following type definitionbut i am unsure how to import this type into a TS file with my function definition. If anybody knows where it gets generated and get it from, it would be helpful thx!
Beta Was this translation helpful? Give feedback.
All reactions