We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently the declarations created in #111 are not very helpful.
Maybe you can improve them and pick up the declarations from here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/vuex-i18n/index.d.ts
After that we can remove it from DefinitelyTyped
The text was updated successfully, but these errors were encountered:
Hi @Shinigami92
Thanks for providing the typescript declarations. I have updated the d.ts of the package.
Sorry, something went wrong.
In which case can this.$t('something') return undefined?
this.$t('something')
undefined
vuex-i18n/dist/vuex-i18n.d.ts
Line 6 in 2c54cea
I thought if the key is missing, 'something' will be returned. I think it is never returning undefined.
'something'
I use strict in my projects, and after every $t call, I have to append a ! to tell TypeScript that I don't assume undefined.
strict
$t
!
Edit: Also looking into your code
vuex-i18n/src/vuex-i18n-plugin.js
Line 98 in 67fc6b5
The defaultValue is empty string and I think this is a good idea!
defaultValue
Version 2 of the plugin is in the works and completely written in typescript (see version 2 branch)
No branches or pull requests
Currently the declarations created in #111 are not very helpful.
Maybe you can improve them and pick up the declarations from here:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/vuex-i18n/index.d.ts
After that we can remove it from DefinitelyTyped
The text was updated successfully, but these errors were encountered: