diff --git a/src/index.tsx b/src/index.tsx index c88120d..c902cbb 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -97,7 +97,13 @@ const MODAL_REGISTRY: { props?: Record; }; } = {}; -const ALREADY_MOUNTED = {}; + +const ALREADY_MOUNTED: Record = {}; +declare module 'react' { + interface FunctionComponent { + [symModalId]?: string; + } +} let uidSeed = 0; let dispatch: React.Dispatch = () => { @@ -377,6 +383,7 @@ export function useModal(modal?: any, args?: any): any { ], ); } +// eslint-disable-next-line @typescript-eslint/ban-types export const create =

( Comp: React.ComponentType

, ): React.FC

=> {