-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript allows passing any string as t() argument #1116
Comments
Any chance this is planned? Has anyone attempted adding this to their project somehow? |
Think I got this working by creating my own wrapper composable returning a
It's using some dark-magic Typescript tricks that I got from https://stackoverflow.com/a/69881190/852765 (adjusted it a little bit to fit my use-case) |
How can I do to show the key corresponding to the value then typing? |
Even though the workaround from @larrifax is somewhat helpful. I'm having a difficult time taking into account all overloads of This is also a problem for other translation functions like |
Agree, it's working but a pain to do and configure. This should be built in 🙏🙂 |
Locales are fully typed now. Keep track of intlify/vue-i18n#1116 for better TS support for them The rest of them are waiting for PRs at Vuetify's side and an SDK upgrade
Locales are fully typed now. Keep track of intlify/vue-i18n#1116 for better TS support for them - The rest of them are waiting for PRs at Vuetify's side, an SDK upgrade and a further investigation of our typed routes setup. - Deep type instantiation is also fixed.
Locales are fully typed now. Keep track of intlify/vue-i18n#1116 for better TS support for them - The rest of them are waiting for PRs at Vuetify's side, an SDK upgrade and a further investigation of our typed routes setup. - Deep type instantiation is also fixed.
Locales are fully typed now. Keep track of intlify/vue-i18n#1116 for better TS support for them - The rest of them are waiting for PRs at Vuetify's side, an SDK upgrade and a further investigation of our typed routes setup. - Deep type instantiation is also fixed.
Locales are fully typed now. Keep track of intlify/vue-i18n#1116 for better TS support for them - The rest of them are waiting for PRs at Vuetify's side, an SDK upgrade and a further investigation of our typed routes setup. - Deep type instantiation is also fixed.
Locales are fully typed now. Keep track of intlify/vue-i18n#1116 for better TS support for them - The rest of them are waiting for PRs at Vuetify's side, an SDK upgrade and a further investigation of our typed routes setup. - Deep type instantiation is also fixed.
Locales are fully typed now. Keep track of intlify/vue-i18n#1116 for better TS support for them - The rest of them are waiting for PRs at Vuetify's side, an SDK upgrade and a further investigation of our typed routes setup. - Deep type instantiation is also fixed.
Any updates? |
I too would like this feature! |
Clear and concise description of the problem
I followed all the steps from the Typescript support page but it does not give an error when I use the
t
function with a missing key.It does show autocomplete suggestions in the template though.
Suggested solution
Typescript should give an error when trying to use a key that is not in the schema
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: