Created
June 6, 2023 16:44
-
-
Save shiftgeist/492bd6a9e15c8dd852780d6c9e1256ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* If a object has a property with Array<{ [key]: val }> and you want to make the array object values partial | |
*/ | |
export type PartialByArray<T, K extends keyof T> = Exclude<T, K> & { | |
[key in K]: Array<{ [B in keyof T[K]]: Partial<T[K][B]> }> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment