tm function causes type errors #1686
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
🔨 p3-minor-bug
Priority 3: a bug in an edge case that only affects very specific usage
Type: Bug
Bug or Bug fixes
typescript
Reporting a bug?
When using vue-18n with typescript I have not found a way to properly type the tm function, following https://vue-i18n.intlify.dev/guide/advanced/typescript.html as guide. See the repro that shows a working use case of using the tm + rt functions. But give the following error when vue-tsc is run
error TS2339: Property 'bar' does not exist on type 'number'. {{ rt(test.bar) }}
.See main.ts and App.vue for the i18n impl.
Expected behavior
The example code provided below should pass typechecking.
Reproduction
https://stackblitz.com/edit/vitejs-vite-eac2nt?file=App.vue
System Info
Screenshot
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: