diff --git a/types/options.d.ts b/types/options.d.ts index cc58affe6a1..cdf59911082 100644 --- a/types/options.d.ts +++ b/types/options.d.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): VNode; - renderError?: (h: () => VNode, err: Error) => VNode; + renderError?(createElement: CreateElement, err: Error): VNode; staticRenderFns?: ((createElement: CreateElement) => VNode)[]; beforeCreate?(this: V): void; diff --git a/types/test/options-test.ts b/types/test/options-test.ts index 6fc9e356451..43c0bd8d25a 100644 --- a/types/test/options-test.ts +++ b/types/test/options-test.ts @@ -185,6 +185,9 @@ Vue.component('component', { [createElement("div", "message")] ]); }, + renderError(createElement, err) { + return createElement('pre', { style: { color: 'red' }}, err.stack) + }, staticRenderFns: [], beforeCreate() {