types: improve h() and TSX type inference
- Should allow extraneous props as attrs in TSX - Should check props when using constructor type returned by createComponent() in h()
This commit is contained in:
@@ -133,9 +133,7 @@ export function h<P>(
|
||||
): VNode
|
||||
export function h<P extends string>(
|
||||
type: ComponentOptionsWithArrayProps<P>,
|
||||
// TODO for now this doesn't really do anything, but it would become useful
|
||||
// if we make props required by default
|
||||
props?: (RawProps & { [key in P]?: any }) | null,
|
||||
props?: RawProps | null,
|
||||
children?: RawChildren | RawSlots
|
||||
): VNode
|
||||
export function h<P>(
|
||||
|
||||
Reference in New Issue
Block a user