Open t-ricci-enhancers opened 3 years ago
A similar issue with React.memo first parameter:
TypeScript declaration:
function memo<P extends object>(
Component: SFC<P>,
propsAreEqual?: (prevProps: Readonly<PropsWithChildren<P>>, nextProps: Readonly<PropsWithChildren<P>>) => boolean
): NamedExoticComponent<P>;
function memo<T extends ComponentType<any>>(
Component: T,
propsAreEqual?: (prevProps: Readonly<ComponentProps<T>>, nextProps: Readonly<ComponentProps<T>>) => boolean
): MemoExoticComponent<T>;
This parameter name should only be "callback" instead it's shown the TypeScript typings of the function.
This is React.useCallback TypeScript declaration: