Open Shinigami92 opened 5 years ago
Hi @Shinigami92
Thanks for providing the typescript declarations. I have updated the d.ts of the package.
In which case can this.$t('something')
return undefined
?
I thought if the key is missing, 'something'
will be returned. I think it is never returning undefined
.
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
.
Edit: Also looking into your code
The defaultValue
is empty string and I think this is a good idea!
Version 2 of the plugin is in the works and completely written in typescript (see version 2 branch)
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