Writing Proxy Components
type ImgProps
= MakeRequired<
JSX.IntrinsicElements["img"],
"alt" | "src"
>;
export function Img(props: ImgProps) {
return <img {...props} />;
}
const anImage = <Img />;
// ^
// Type '{}' is missing the following properties from type
// 'Required<Pick<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>,
// HTMLImageElement>, "alt" | "src">>': alt, src (2739)