Open dustinlacewell opened 1 year ago
In ComponentType I believe there is a missing readonly keyword when attempting to conditionally infer ListType:
ComponentType
readonly
ListType
export type ComponentType<T extends ISchema> = { [key in keyof T]: T[key] extends Type ? ArrayByType[T[key]] : T[key] extends [infer RT, number] ? RT extends Type ? Array<ArrayByType[RT]> : unknown : T[key] extends ISchema ? ComponentType<T[key]> : unknown; };
Should read:
export type ComponentType<T extends ISchema> = { [key in keyof T]: T[key] extends Type ? ArrayByType[T[key]] : T[key] extends readonly [infer RT, number] ? RT extends Type ? Array<ArrayByType[RT]> : unknown : T[key] extends ISchema ? ComponentType<T[key]> : unknown; };
In
ComponentType
I believe there is a missingreadonly
keyword when attempting to conditionally inferListType
:Should read: