📌  相关文章
📜  类型“T”不满足约束“keyof IntrinsicElements | JSX 元素构造器<any>&#39;. - 打字稿代码示例

📅  最后修改于: 2022-03-11 14:48:14.786000             🧑  作者: Mango

代码示例1
// If you tried to use the generics with React.ComponentProps
// Then this is a working example for you

function myFunction>
  (Component: T, props: React.ComponentProps {
  // implementation
}

// You must extend the T otherwise you will get this error you are searching on google right now