fix: deriver props type checking

This commit is contained in:
Cole Lawrence 2022-07-29 12:00:07 -04:00
parent 2ef9d5e346
commit a4b24313a0

View file

@ -57,7 +57,7 @@ type ReactDeriver<Props extends {}> = (
*/ */
export function deriver<Props extends {}>( export function deriver<Props extends {}>(
Component: React.ComponentType<Props>, Component: React.ComponentType<Props>,
): ReactDeriver<Props> { ): ReactDeriver<Omit<Props, keyof JSX.IntrinsicAttributes>> {
const finalComp = React.memo( const finalComp = React.memo(
React.forwardRef(function deriverRender( React.forwardRef(function deriverRender(
props: Record<string, $IntentionalAny>, props: Record<string, $IntentionalAny>,