diff --git a/creators/extension/pkg/vue-shim.ts b/creators/extension/pkg/vue-shim.ts index 8f6f4102637..195d98e1f36 100644 --- a/creators/extension/pkg/vue-shim.ts +++ b/creators/extension/pkg/vue-shim.ts @@ -1,4 +1,15 @@ -declare module '*.vue' { - import Vue from 'vue'; - export default Vue; +export {} + +declare module 'vue' { + interface ComponentCustomProperties { + /** + * Lookup a given string with the given arguments + * @param raw if set, do not do HTML escaping. + */ + t: { + (key: string, args?: Record, raw?: boolean): string; + (options: { k: string; raw?: boolean; tag?: string | Record; escapehtml?: boolean }): string; + } + } } + diff --git a/pkg/rancher-components/src/shim-vue.d.ts b/pkg/rancher-components/src/shim-vue.d.ts index 713a24274e0..b68bf0ae1dd 100644 --- a/pkg/rancher-components/src/shim-vue.d.ts +++ b/pkg/rancher-components/src/shim-vue.d.ts @@ -1,11 +1,6 @@ -import { DefineComponent } from 'vue' +export {} -declare module '*.vue' { - const component: DefineComponent<{}, {}, any> - export default component -} - -declare module '@vue/runtime-core' { +declare module 'vue' { interface ComponentCustomProperties { /** * Lookup a given string with the given arguments diff --git a/shell/types/vue-shim.d.ts b/shell/types/vue-shim.d.ts index 9f73a9f8a7f..b85c42c9dcb 100644 --- a/shell/types/vue-shim.d.ts +++ b/shell/types/vue-shim.d.ts @@ -1,13 +1,7 @@ /* eslint-disable */ -import type { DefineComponent } from 'vue' -import { ComponentCustomProperties } from 'vue'; +export {}; -declare module '*.vue' { - const component: DefineComponent<{}, {}, any> - export default component -} - -declare module '@vue/runtime-core' { +declare module 'vue' { interface ComponentCustomProperties { t: { (key: string, args?: Record, raw?: boolean): string;