]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(types): added `getSSRProps` type argument (#5691)
authornandi95 <41805560+nandi95@users.noreply.github.com>
Mon, 27 May 2024 08:56:59 +0000 (09:56 +0100)
committerGitHub <noreply@github.com>
Mon, 27 May 2024 08:56:59 +0000 (16:56 +0800)
packages/runtime-core/src/directives.ts

index daaf28b15188e4f369038d0762acda2cc9f429b8..feff9ad268d1c39189647ca7fd61d7d5c99346a2 100644 (file)
@@ -42,8 +42,8 @@ export type DirectiveHook<T = any, Prev = VNode<any, T> | null, V = any> = (
   prevVNode: Prev,
 ) => void
 
-export type SSRDirectiveHook = (
-  binding: DirectiveBinding,
+export type SSRDirectiveHook<V> = (
+  binding: DirectiveBinding<V>,
   vnode: VNode,
 ) => Data | undefined
 
@@ -55,7 +55,7 @@ export interface ObjectDirective<T = any, V = any> {
   updated?: DirectiveHook<T, VNode<any, T>, V>
   beforeUnmount?: DirectiveHook<T, null, V>
   unmounted?: DirectiveHook<T, null, V>
-  getSSRProps?: SSRDirectiveHook
+  getSSRProps?: SSRDirectiveHook<V>
   deep?: boolean
 }