Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript recursive partial

type RecursivePartial<T> = {
  [P in keyof T]?:
    T[P] extends (infer U)[] ? RecursivePartial<U>[] :
    T[P] extends object ? RecursivePartial<T[P]> :
    T[P];
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #recursive #partial
ADD COMMENT
Topic
Name
6+1 =