feat(core-extensions): Handle function type in MappedKeys
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
export type MappedKeys<T, R extends string> = T extends any[]
|
export type MappedKeys<T, R extends string> = T extends Function
|
||||||
? { [K in keyof T]: MappedKeys<T[K], R> }
|
? T
|
||||||
: T extends object
|
: T extends Array<infer U>
|
||||||
? {
|
? Array<MappedKeys<U, R>>
|
||||||
[K in keyof T as R]: MappedKeys<T[K], R>
|
: T extends object
|
||||||
}
|
? {
|
||||||
: T
|
[K in keyof T as R]: MappedKeys<T[K], R>
|
||||||
|
}
|
||||||
|
: T
|
||||||
|
|||||||
Reference in New Issue
Block a user