反应,我被困在这个错误Type '({ items }: PropsWithChildren<TodoProps>) => Element[]' is not assignable to type 'FunctionComponent完全错误:
Type '({ items }: PropsWithChildren<TodoProps>) => Element[]' is not assignable to type 'FunctionComponent错误发生在
如何编写接受组件并将其prop类型用作第二个参数的类型的泛型 假设我传入了一个类型为React.FunctionComponent<IMovieShowcase>的组件 如何提取IMovieShowcase的类型 function renderWithProviders<T How to extract type of T<Props>>(
Component: T, props: // props