type FunctionComponent<P = any> = (props: P) => Element | null;
interface ElementAttributes {
idomKey?: string | null | number;
children?: unknown;
skip?: boolean;
}
declare function element<P>(
tag: FunctionComponent<P & ElementAttributes>,
attributes: P & ElementAttributes,
): Element;
declare function ElName(props: {name?: string}): Element;
element(ElName, {});
// Does not compile in 5.6. Should compile.
Argument of type '(props: { name?: string | undefined; }) => Element' is not assignable to parameter of type 'FunctionComponent<ElementAttributes>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'ElementAttributes' has no properties in common with type '{ name?: string | undefined; }'.(2345)