deepmerge(t: T, p: Partial<T>) results in an inferred Partial<T> instead of a T
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 条评论