DeepPartial
객체의 모든 속성을 옵셔널하게 만듭니다
Signature
type DeepPartial<T extends Obj | undefined> = Partial<{ [K in keyof T]: T[K] extends Obj | undefined ? Partial<T[K]> : T[K] }>;
References
Example
type Example = DeepPartial<{
a: number;
b: { c : number; d : string };
}>;
Example = {
a?: number;
b?: { c? : number; d? : string };
}
tsx