From 7adb6c880c5ecca02e625467da001212a6eabcd0 Mon Sep 17 00:00:00 2001 From: Carles Mitjans Coma Date: Wed, 22 Nov 2023 14:10:51 +0100 Subject: [PATCH] feat: add types when accessing global directives --- packages/runtime-core/src/apiCreateApp.ts | 2 +- packages/runtime-core/src/compat/global.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index a0e78955c4f..e516765b44a 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -42,7 +42,7 @@ export interface App { mixin(mixin: ComponentOptions): this component(name: string): Component | undefined component(name: string, component: Component | DefineComponent): this - directive(name: string): Directive | undefined + directive(name: string): Directive | undefined directive(name: string, directive: Directive): this mount( rootContainer: HostElement | string, diff --git a/packages/runtime-core/src/compat/global.ts b/packages/runtime-core/src/compat/global.ts index 8f69184e44d..7d084333292 100644 --- a/packages/runtime-core/src/compat/global.ts +++ b/packages/runtime-core/src/compat/global.ts @@ -82,7 +82,7 @@ export type CompatVue = Pick & { component(name: string): Component | undefined component(name: string, component: Component): CompatVue - directive(name: string): Directive | undefined + directive(name: string): Directive | undefined directive( name: string, directive: Directive