File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -39,17 +39,23 @@ type ComponentType = DefineComponent<{
39
39
}
40
40
} >
41
41
42
- declare module 'vue' {
43
- interface ComponentCustomProperties {
42
+ // @ts -ignore: works on Vue 2, fails in Vue 3
43
+ declare module 'vue/types/vue' {
44
+ export interface Vue {
44
45
$t : ( key : string , values ?: Record < string , unknown > ) => string
45
46
$ta : ( key : string , values ?: Record < string , unknown > ) => Record < string , string >
46
47
}
48
+ }
47
49
48
- interface ComponentCustomProperties {
50
+ // @ts -ignore: works on Vue 3, fails in Vue 2
51
+ declare module '@vue/runtime-core' {
52
+ export interface ComponentCustomProperties {
53
+ $t : ( key : string , values ?: Record < string , unknown > ) => string
54
+ $ta : ( key : string , values ?: Record < string , unknown > ) => Record < string , string >
49
55
vT : FunctionDirective < HTMLElement , Record < string , FluentVariable > >
50
56
}
51
57
52
- interface GlobalComponents {
58
+ export interface GlobalComponents {
53
59
i18n : ComponentType
54
60
}
55
61
}
You can’t perform that action at this time.
0 commit comments