From: Evan You Date: Wed, 12 Jun 2019 08:22:52 +0000 (+0800) Subject: wip: types X-Git-Tag: v3.0.0-alpha.0~940 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2230917ab475a6339caa0a5235ecdad0f224ad75;p=thirdparty%2Fvuejs%2Fcore.git wip: types --- diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index a3874ac67f..3b9854a111 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -68,7 +68,7 @@ interface ComponentOptionsWithoutProps { } interface ComponentOptionsWithArrayProps< - PropNames extends string, + PropNames extends string = string, RawBindings = Data, Props = { [key in PropNames]?: any } > { @@ -80,7 +80,10 @@ interface ComponentOptionsWithArrayProps< render?: RenderFunctionWithThis } -type ComponentOptions = ComponentOptionsWithProps | ComponentOptionsWithoutProps +type ComponentOptions = + | ComponentOptionsWithProps + | ComponentOptionsWithoutProps + | ComponentOptionsWithArrayProps export interface FunctionalComponent

extends RenderFunction

{ props?: ComponentPropsOptions