From 508d358d338aee99f0b83dfe7f696388f52bc6e1 Mon Sep 17 00:00:00 2001 From: ibrahim halil sakli <63147096+softwareVirus@users.noreply.github.com> Date: Wed, 1 May 2024 16:31:02 +0300 Subject: [PATCH] Fix props with array type in ComposableContext type --- src/types-handling.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types-handling.ts b/src/types-handling.ts index 629045b..81a2ee1 100644 --- a/src/types-handling.ts +++ b/src/types-handling.ts @@ -35,7 +35,7 @@ export type ComposableContext = (Props ext * ["title"] -> { title: ArgType | any } */ { - readonly [P in Props[number]]: Args extends { [K in keyof Props[number]]: infer ArgType } ? ArgType : any + readonly [P in Props]: Args extends { [K in keyof Props]: infer ArgType } ? ArgType : any } : /** * { title: Number } -> { title: Number | undefined }