ITADN

deepmerge(t: T, p: Partial<T>) results in an inferred Partial<T> instead of a T

#548Openedwarddrapkin-or 创建于 2025-04-29
Status: TriageType: Bug
Given this code: ```ts interface Example { a: string; b: string; } declare const ex1: Example; declare const ex2: Partial<Example>; const merged = deepmerge(ex1, ex2); ``` merged gets its type inferred as `Partial<Example>` but it should be `Example`: `T & Partial<T>` is equivalent to `T`.
0 条评论