diff --git a/src/index.tsx b/src/index.tsx index 9e4f5b7..c13d055 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -219,10 +219,11 @@ type NiceModalArgs = T extends keyof JSX.IntrinsicElements | React.JSXElement ? React.ComponentProps : Record; -export function show>>>( - modal: React.FC, - args?: P, -): Promise; +export function show< + T extends any, + C extends any = any, + P extends Partial>> = Partial>>, +>(modal: React.FC, args?: P): Promise; export function show(modal: string, args?: Record): Promise; export function show(modal: string, args: P): Promise;