-
-
Notifications
You must be signed in to change notification settings - Fork 617
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
import type { ConditionalPick } from 'type-fest';
interface TestInterface {
a: string;
}
// TS validates that everything is ok - WHY ?
// ConditionalPick<TestInterface, number> === {} .....
const test123123123: ConditionalPick<TestInterface, number> = {
sdfsdfsdf: 'asdasd',
};
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Projects
Milestone
Relationships
Development
Select code repository
Activity
som-sm commentedon Jun 20, 2025
This happens because
ConditionalPick
currently returns the{}
type when no matching key is found.In cases like these, the output should probably be
never
.benzaria commentedon Jun 22, 2025
@salisbury-espinosa u can use a wrapper at the moment if urgent!
or an
IsEqual
can do as well:Also I think this can settle the issue?