refactor: fix broken Vue component custom properties (#9351)
This commit is contained in:

committed by
GitHub

parent
8f389b6a73
commit
411b088418
17
packages/client/@types/vue.d.ts
vendored
17
packages/client/@types/vue.d.ts
vendored
@@ -1,7 +1,16 @@
|
||||
/// <reference types="vue/macros-global" />
|
||||
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue';
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
import type { $i } from '@/account';
|
||||
import type { defaultStore } from '@/store';
|
||||
import type { instance } from '@/instance';
|
||||
import type { i18n } from '@/i18n';
|
||||
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$i: typeof $i;
|
||||
$store: typeof defaultStore;
|
||||
$instance: typeof instance;
|
||||
$t: typeof i18n['t'];
|
||||
$ts: typeof i18n['ts'];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user