Skip to content

Commit

Permalink
feat: add types when accessing global directives
Browse files Browse the repository at this point in the history
  • Loading branch information
mitjans committed Nov 22, 2023
1 parent f0592e5 commit 7adb6c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/apiCreateApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface App<HostElement = any> {
mixin(mixin: ComponentOptions): this
component(name: string): Component | undefined
component(name: string, component: Component | DefineComponent): this
directive(name: string): Directive | undefined
directive<T = any, V = any>(name: string): Directive<T, V> | undefined
directive<T = any, V = any>(name: string, directive: Directive<T, V>): this
mount(
rootContainer: HostElement | string,
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-core/src/compat/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {

component(name: string): Component | undefined
component(name: string, component: Component): CompatVue
directive(name: string): Directive | undefined
directive<T = any, V = any>(name: string): Directive<T, V> | undefined
directive<T = any, V = any>(
name: string,
directive: Directive<T, V>
Expand Down

0 comments on commit 7adb6c8

Please sign in to comment.