Browse Source

fix(types): make render option in functional components to optional (#7663)

dev
katashin 7 years ago
committed by Evan You
parent
commit
b2092dbff9
  1. 2
      types/options.d.ts
  2. 4
      types/test/options-test.ts

2
types/options.d.ts

@ -110,7 +110,7 @@ export interface FunctionalComponentOptions<Props = DefaultProps, PropDefs = Pro
props?: PropDefs;
inject?: InjectOptions;
functional: boolean;
render(this: undefined, createElement: CreateElement, context: RenderContext<Props>): VNode;
render?(this: undefined, createElement: CreateElement, context: RenderContext<Props>): VNode;
}
export interface RenderContext<Props=DefaultProps> {

4
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"));

Loading…
Cancel
Save