From c4784b5e736ebe20eb3d59b7c6acffdff7392558 Mon Sep 17 00:00:00 2001 From: Carles Mitjans Coma Date: Wed, 22 Nov 2023 14:07:22 +0100 Subject: [PATCH] feat: add types when creating global directives --- packages/runtime-core/src/apiCreateApp.ts | 2 +- packages/runtime-core/src/compat/global.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index 8e4ab1f3aa0..6409d03031b 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -42,7 +42,7 @@ export interface App { component(name: string): Component | undefined component(name: string, component: Component): this directive(name: string): Directive | undefined - directive(name: string, directive: Directive): this + directive(name: string, directive: Directive): this mount( rootContainer: HostElement | string, isHydrate?: boolean, diff --git a/packages/runtime-core/src/compat/global.ts b/packages/runtime-core/src/compat/global.ts index 2efceb87fa6..8f69184e44d 100644 --- a/packages/runtime-core/src/compat/global.ts +++ b/packages/runtime-core/src/compat/global.ts @@ -83,7 +83,10 @@ export type CompatVue = Pick & { component(name: string): Component | undefined component(name: string, component: Component): CompatVue directive(name: string): Directive | undefined - directive(name: string, directive: Directive): CompatVue + directive( + name: string, + directive: Directive + ): CompatVue compile(template: string): RenderFunction