Skip to content

Instantly share code, notes, and snippets.

@ftischler
Created May 8, 2020 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ftischler/200ed134693511d9cd63a27fd634cbfe to your computer and use it in GitHub Desktop.
Save ftischler/200ed134693511d9cd63a27fd634cbfe to your computer and use it in GitHub Desktop.
export declare type DeepPartial<T> = {
[P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : DeepPartial<T[P]>;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment