Skip to content

Commit 2e2f7b2

Browse files
committed
fix: forgot type annotions
1 parent f4168dc commit 2e2f7b2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

packages/vue-i18n-core/src/i18n.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,17 +320,22 @@ export function createI18n(options: any = {}): any {
320320
const __globalInjection = isBoolean(options.globalInjection)
321321
? options.globalInjection
322322
: true
323-
const __instances = new Map<ComponentInternalInstance, Composer>()
323+
const __instances = new Map<ComponentInternalInstance | GenericComponentInstance, Composer>()
324324
const [globalScope, __global] = createGlobal(options)
325325
const symbol: InjectionKey<I18n> | string = /* #__PURE__*/ makeSymbol(__DEV__ ? 'vue-i18n' : '')
326326

327-
function __getInstance(component: ComponentInternalInstance): Composer | null {
327+
function __getInstance(
328+
component: ComponentInternalInstance | GenericComponentInstance
329+
): Composer | null {
328330
return __instances.get(component) || null
329331
}
330-
function __setInstance(component: ComponentInternalInstance, instance: Composer): void {
332+
function __setInstance(
333+
component: ComponentInternalInstance | GenericComponentInstance,
334+
instance: Composer
335+
): void {
331336
__instances.set(component, instance)
332337
}
333-
function __deleteInstance(component: ComponentInternalInstance): void {
338+
function __deleteInstance(component: ComponentInternalInstance | GenericComponentInstance): void {
334339
__instances.delete(component)
335340
}
336341

0 commit comments

Comments
 (0)