]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: types
authorEvan You <yyx990803@gmail.com>
Wed, 12 Jun 2019 08:22:52 +0000 (16:22 +0800)
committerEvan You <yyx990803@gmail.com>
Wed, 12 Jun 2019 08:22:52 +0000 (16:22 +0800)
packages/runtime-core/src/component.ts

index a3874ac67f141375bdc094368d9b669c6d094062..3b9854a1110a38b980d5b0bd06fc0ed04f76e414 100644 (file)
@@ -68,7 +68,7 @@ interface ComponentOptionsWithoutProps<Props = Data, RawBindings = Data> {
 }
 
 interface ComponentOptionsWithArrayProps<
-  PropNames extends string,
+  PropNames extends string = string,
   RawBindings = Data,
   Props = { [key in PropNames]?: any }
 > {
@@ -80,7 +80,10 @@ interface ComponentOptionsWithArrayProps<
   render?: RenderFunctionWithThis<Props, RawBindings>
 }
 
-type ComponentOptions = ComponentOptionsWithProps | ComponentOptionsWithoutProps
+type ComponentOptions =
+  | ComponentOptionsWithProps
+  | ComponentOptionsWithoutProps
+  | ComponentOptionsWithArrayProps
 
 export interface FunctionalComponent<P = {}> extends RenderFunction<P> {
   props?: ComponentPropsOptions<P>