From 39876c49ec7756d744cb9d1f7c05d360b475d168 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 6409d03031b..23eef96ca52 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -41,7 +41,7 @@ export interface App { mixin(mixin: ComponentOptions): this component(name: string): Component | undefined component(name: string, component: Component): 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