-
-
Notifications
You must be signed in to change notification settings - Fork 662
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
the correct operation of this utility depends on the order of types!
Let's say there is interface Pokemon like this:
import type {MergeDeep} from 'type-fest';
interface Pokemon {
name: string;
type: string;
}valid :
const testThroughAssert: Pokemon = {} as MergeDeep<
Partial<Pokemon>,
Pokemon
>;=> success
invalid:
const testThroughAssert: Pokemon = {} as MergeDeep<
Pokemon,
Partial<Pokemon>
>;=> error TS2322: Type '{ name?: string | undefined; type?: string | undefined; }' is not assignable to type 'Pokemon'.
Repro
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working