@@ -52,8 +52,12 @@ export type DirectiveHook<
52
52
prevVNode : Prev ,
53
53
) => void
54
54
55
- export type SSRDirectiveHook = (
56
- binding : DirectiveBinding ,
55
+ export type SSRDirectiveHook <
56
+ Value = any ,
57
+ Modifiers extends string = string ,
58
+ Arg extends string = string ,
59
+ > = (
60
+ binding : DirectiveBinding < Value , Modifiers , Arg > ,
57
61
vnode : VNode ,
58
62
) => Data | undefined
59
63
@@ -63,6 +67,12 @@ export interface ObjectDirective<
63
67
Modifiers extends string = string ,
64
68
Arg extends string = string ,
65
69
> {
70
+ /**
71
+ * @internal without this, ts-expect-error in directives.test-d.ts somehow
72
+ * fails when running tsc, but passes in IDE and when testing against built
73
+ * dts. Could be a TS bug.
74
+ */
75
+ __mod ?: Modifiers
66
76
created ?: DirectiveHook < HostElement , null , Value , Modifiers , Arg >
67
77
beforeMount ?: DirectiveHook < HostElement , null , Value , Modifiers , Arg >
68
78
mounted ?: DirectiveHook < HostElement , null , Value , Modifiers , Arg >
@@ -82,7 +92,7 @@ export interface ObjectDirective<
82
92
>
83
93
beforeUnmount ?: DirectiveHook < HostElement , null , Value , Modifiers , Arg >
84
94
unmounted ?: DirectiveHook < HostElement , null , Value , Modifiers , Arg >
85
- getSSRProps ?: SSRDirectiveHook
95
+ getSSRProps ?: SSRDirectiveHook < Value , Modifiers , Arg >
86
96
deep ?: boolean
87
97
}
88
98
0 commit comments