Evan You 7 anos atrás
pai
commit
2230917ab4
1 arquivos alterados com 5 adições e 2 exclusões
  1. 5 2
      packages/runtime-core/src/component.ts

+ 5 - 2
packages/runtime-core/src/component.ts

@@ -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>