Closed daniser closed 1 year ago
Hey @daniser can you create a repo with that exact issue?
Thanks.
@xiCO2k https://github.com/daniser/i18n-example
Without vue-tsc
it works well.
Great Thanks
@daniser This worked for me:
resources/js/types/global.d.ts
(if it's not there already)
import { trans } from 'laravel-vue-i18n';
declare module 'vue' { interface ComponentCustomProperties { $t: typeof trans; } }
3. make sure the file is included in tsconfig.json:
{ ... "include": ["resources/js/*/.d.ts", ...] ... }
If anyone want to help, making a PR to solve this, I would love to review it.
I can't use
$t
and$tChoice
mixins, TypeScript doesn't compile: