diff --git a/packages/core/src/h.ts b/packages/core/src/h.ts index c461017d..c07e11f4 100644 --- a/packages/core/src/h.ts +++ b/packages/core/src/h.ts @@ -54,53 +54,51 @@ type OptionsComponent

= | (ComponentOptions

& { template: string }) | (ComponentOptions

& { render: Function }) +// TODO improve return type with props information interface createElement extends VNodeFactories { // element + (tag: string, children?: RawChildrenType): VNode ( tag: string, // TODO support native element properties data?: VNodeData & Differ | null, children?: RawChildrenType | RawSlots ): VNode - (tag: string, children?: RawChildrenType): VNode // fragment + (tag: typeof Fragment, children?: RawChildrenType): VNode ( tag: typeof Fragment, data?: ({ key?: Key } & Differ) | null, children?: RawChildrenType | RawSlots ): VNode - (tag: typeof Fragment, children?: RawChildrenType): VNode // portal + (tag: typeof Portal, children?: RawChildrenType): VNode ( tag: typeof Portal, data?: ({ target: any } & BuiltInProps & Differ) | null, children?: RawChildrenType | RawSlots ): VNode - (tag: typeof Portal, children?: RawChildrenType): VNode // object +

(tag: OptionsComponent

, children?: RawChildrenType): VNode

( tag: OptionsComponent

, data?: (P & BuiltInProps & Differ) | null, children?: RawChildrenType | RawSlots ): VNode -

(tag: OptionsComponent

, children?: RawChildrenType): VNode // functional +

(tag: FunctionalComponent

, children?: RawChildrenType): VNode

( tag: FunctionalComponent

, data?: (P & BuiltInProps & Differ) | null, children?: RawChildrenType | RawSlots ): VNode -

(tag: FunctionalComponent

, children?: RawChildrenType): VNode // class - >( - tag: new () => T & { $props: P }, +

(tag: new () => ComponentInstance

, children?: RawChildrenType): VNode +

( + tag: new () => ComponentInstance

, data?: (P & BuiltInProps & Differ) | null, children?: RawChildrenType | RawSlots ): VNode - >( - tag: new () => T & { $props: P }, - children?: RawChildrenType - ): VNode } export const h = ((tag: ElementType, data?: any, children?: any): VNode => {