import type { JSX } from 'pota'
type MakeRequired<T, K extends keyof T> = Omit<T, K> &
Required<{ [P in K]: T[P] }>
type ImgProps = MakeRequired<
JSX.IntrinsicElements['img'],
'alt' | 'src'
>
export function Img({ alt, ...all }: ImgProps) {
return (
<img
alt={alt}
{...all}
/>
)
}
// 💥 Type error, alt is missing
export function Component() {
return <Img src="..." />
}