From ac217d2472bb92ce901ef1f46595b44a1b5d1a18 Mon Sep 17 00:00:00 2001 From: st-sloth Date: Sat, 1 Dec 2018 09:28:29 +0500 Subject: [PATCH] fix(types): fix `renderError`arguments type (#8636) fix #8635 --- types/options.d.ts | 2 +- types/test/options-test.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/types/options.d.ts b/types/options.d.ts index bd96b647..7d5861d1 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 1c6ecff6..8755564c 100644 --- a/types/test/options-test.ts +++ b/types/test/options-test.ts @@ -202,6 +202,9 @@ Vue.component('component', { [createElement("div", "message")] ]); }, + renderError(createElement, err) { + return createElement('pre', { style: { color: 'red' }}, err.stack) + }, staticRenderFns: [], beforeCreate() {