📜  React.ComponentProps<T> - 打字稿代码示例

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

代码示例1
function myFunction>
  (Component: T, props: React.ComponentProps {
  // implementation
}

// You must extend the T otherwise you will get this error
// Type 'T' does not satisfy the constraint 'keyof IntrinsicElements | JSXElementConstructor'.