Skip to content
Permalink
Browse files

fix(types): fix `renderError`arguments type (#8636)

fix #8635
  • Loading branch information...
st-sloth authored and yyx990803 committed Dec 1, 2018
1 parent c711ec1 commit ac217d2472bb92ce901ef1f46595b44a1b5d1a18
Showing with 4 additions and 1 deletion.
  1. +1 −1 types/options.d.ts
  2. +3 −0 types/test/options-test.ts
@@ -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;
@@ -202,6 +202,9 @@ Vue.component('component', {
[createElement("div", "message")]
]);
},
renderError(createElement, err) {
return createElement('pre', { style: { color: 'red' }}, err.stack)
},
staticRenderFns: [],

beforeCreate() {

0 comments on commit ac217d2

Please sign in to comment.
You can’t perform that action at this time.