Skip to content

Commit

Permalink
fix(types): fix renderErrorarguments type (#8636)
Browse files Browse the repository at this point in the history
fix #8635
  • Loading branch information
st-sloth authored and yyx990803 committed Dec 1, 2018
1 parent c711ec1 commit ac217d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export interface ComponentOptions<
template?: string;
// hack is for funcitonal component type inference, should not used in user code
render?(createElement: CreateElement, hack: RenderContext<Props>): VNode;
renderError?: (h: () => VNode, err: Error) => VNode;
renderError?(createElement: CreateElement, err: Error): VNode;
staticRenderFns?: ((createElement: CreateElement) => VNode)[];

beforeCreate?(this: V): void;
Expand Down
3 changes: 3 additions & 0 deletions types/test/options-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ Vue.component('component', {
[createElement("div", "message")]
]);
},
renderError(createElement, err) {
return createElement('pre', { style: { color: 'red' }}, err.stack)
},
staticRenderFns: [],

beforeCreate() {
Expand Down

0 comments on commit ac217d2

Please sign in to comment.