diff --git a/src/utility-types.ts b/src/utility-types.ts index 7755466..46aec1e 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -95,7 +95,7 @@ export type $PropertyType = T[K]; export type $ElementType< T extends { [P in K & any]: any }, K extends keyof T | number -> = T[K]; +> = T extends [] ? T[K] : T[Exclude>]; /** * $Call