From b2092dbff9ab0ccfa8e59ed3ca540cca0715c683 Mon Sep 17 00:00:00 2001 From: katashin Date: Fri, 9 Mar 2018 01:55:27 +0900 Subject: [PATCH] fix(types): make render option in functional components to optional (#7663) --- types/options.d.ts | 2 +- types/test/options-test.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/options.d.ts b/types/options.d.ts index d6f21d4ee74..dcaf5f5a0f3 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -110,7 +110,7 @@ export interface FunctionalComponentOptions): VNode; + render?(this: undefined, createElement: CreateElement, context: RenderContext): VNode; } export interface RenderContext { diff --git a/types/test/options-test.ts b/types/test/options-test.ts index 82e04882139..df03ed787fc 100644 --- a/types/test/options-test.ts +++ b/types/test/options-test.ts @@ -331,6 +331,10 @@ Vue.component('functional-component-object-inject', { } }) +Vue.component('functional-component-check-optional', { + functional: true +}) + Vue.component("async-component", ((resolve, reject) => { setTimeout(() => { resolve(Vue.component("component"));