Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DeepPartial in TypeScript
export type DeepPartial<T> = T extends Function
? T
: T extends object
? { [P in keyof T]?: DeepPartial<T[P]> | undefined }
: T | undefined;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment