From c3882c6d6e997e65930a225aea1c762b154de8ef Mon Sep 17 00:00:00 2001 From: ktsn Date: Sun, 18 Feb 2018 18:43:13 +0900 Subject: [PATCH] fix(types): make render option in functional components to optional --- 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 a54993fff5d..75ce2257966 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 a14560fe1b3..45c3d088fe8 100644 --- a/types/test/options-test.ts +++ b/types/test/options-test.ts @@ -330,6 +330,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"));