Explorar o código

fix(types): add missing `listeners` type on RenderContext (#7584)

katashin %!s(int64=8) %!d(string=hai) anos
pai
achega
db1b18ceec
Modificáronse 2 ficheiros con 2 adicións e 0 borrados
  1. 1 0
      types/options.d.ts
  2. 1 0
      types/test/options-test.ts

+ 1 - 0
types/options.d.ts

@@ -119,6 +119,7 @@ export interface RenderContext<Props=DefaultProps> {
   slots(): any;
   data: VNodeData;
   parent: Vue;
+  listeners: { [key: string]: Function | Function[] };
   injections: any
 }
 

+ 1 - 0
types/test/options-test.ts

@@ -312,6 +312,7 @@ Vue.component('functional-component', {
     context.slots();
     context.data;
     context.parent;
+    context.listeners.click;
     return createElement("div", {}, context.children);
   }
 });