File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { SetupContext } from './v3-setup-context'
44import { DebuggerEvent } from './v3-generated'
55import { DefineComponent } from './v3-define-component'
66import { ComponentOptionsMixin } from './v3-component-options'
7+ import { ObjectDirective , FunctionDirective } from './v3-directive'
78
89type Constructor = {
910 new ( ...args : any [ ] ) : any
@@ -318,13 +319,19 @@ export interface DirectiveBinding extends Readonly<VNodeDirective> {
318319 readonly modifiers : { [ key : string ] : boolean }
319320}
320321
322+ /**
323+ * @deprecated use {@link FunctionDirective} instead
324+ */
321325export type DirectiveFunction = (
322326 el : HTMLElement ,
323327 binding : DirectiveBinding ,
324328 vnode : VNode ,
325329 oldVnode : VNode
326330) => void
327331
332+ /**
333+ * @deprecated use {@link ObjectDirective} instead
334+ */
328335export interface DirectiveOptions {
329336 bind ?: DirectiveFunction
330337 inserted ?: DirectiveFunction
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import {
2222 ExtractComputedReturns ,
2323 ComponentOptionsMixin
2424} from './v3-component-options'
25+ import { Directive , ObjectDirective } from './v3-directive'
2526
2627export interface CreateElement {
2728 (
@@ -338,6 +339,10 @@ export interface VueConstructor<V extends Vue = Vue> {
338339 id : string ,
339340 definition ?: DirectiveOptions | DirectiveFunction
340341 ) : DirectiveOptions
342+ directive (
343+ id : string ,
344+ definition ?: Directive
345+ ) : ObjectDirective
341346 filter ( id : string , definition ?: Function ) : Function
342347
343348 component ( id : string ) : VueConstructor
You can’t perform that action at this time.
0 commit comments