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