Browse Source

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

dev
katashin 7 years ago
committed by Evan You
parent
commit
db1b18ceec
  1. 1
      types/options.d.ts
  2. 1
      types/test/options-test.ts

1
types/options.d.ts

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

1
types/test/options-test.ts

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

Loading…
Cancel
Save