Skip to content

Commit 97304d9

Browse files
ktsnhefeng
authored and
hefeng
committed
fix(types): add missing listeners type on RenderContext (vuejs#7584)
1 parent f129024 commit 97304d9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

types/options.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export interface RenderContext<Props=DefaultProps> {
119119
slots(): any;
120120
data: VNodeData;
121121
parent: Vue;
122+
listeners: { [key: string]: Function | Function[] };
122123
injections: any
123124
}
124125

types/test/options-test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ Vue.component('functional-component', {
312312
context.slots();
313313
context.data;
314314
context.parent;
315+
context.listeners.click;
315316
return createElement("div", {}, context.children);
316317
}
317318
});

0 commit comments

Comments
 (0)