Skip to content
Snippets Groups Projects
Unverified Commit 411b0884 authored by Kagami Sascha Rosylight's avatar Kagami Sascha Rosylight Committed by GitHub
Browse files

refactor: fix broken Vue component custom properties (#9351)

parent 8f389b6a
No related branches found
Tags 12.108.0
No related merge requests found
/// <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'];
}
}
......@@ -3,11 +3,3 @@ import { locale } from '@/config';
import { I18n } from '@/scripts/i18n';
export const i18n = markRaw(new I18n(locale));
// このファイルに書きたくないけどここに書かないと何故かVeturが認識しない
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$t: typeof i18n['t'];
$ts: typeof i18n['locale'];
}
}
......@@ -43,10 +43,3 @@ export const emojiTags = computed(() => {
}
return Array.from(tags);
});
// このファイルに書きたくないけどここに書かないと何故かVeturが認識しない
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$instance: typeof instance;
}
}
......@@ -381,10 +381,3 @@ export class ColdDeviceStorage {
};
}
}
// このファイルに書きたくないけどここに書かないと何故かVeturが認識しない
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$store: typeof defaultStore;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment