{"version":3,"file":"typed-react.cjs","sources":["../../../src/utils/typed-react.ts"],"sourcesContent":["import type { ComponentType, ComponentProps } from 'react';\nimport React from 'react';\n\n/**\n * Sugar around React.memo to avoid the need to specify the type of the component.\n * @group Utils\n */\n// There is an issue with Typescript when Component has generic Props\n// see: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst typedMemo = React.memo as <Component extends ComponentType<any>>(\n  function_: Component,\n  propsAreEqual?: (\n    previousProps: Readonly<ComponentProps<Component>>,\n    nextProps: Readonly<ComponentProps<Component>>\n  ) => boolean\n) => Component;\n\n/**\n * Sugar around React.memo to avoid the need to specify the type of the component.\n * @param function_ - The component to memoize.\n * @group Utils\n * @internal\n */\nexport default typedMemo;\n"],"names":[],"mappings":";;;;;;;;;;;AAUA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA;;"}