Same issue as #1197 but for ConditionalPickDeep.
When no keys match the given condition, ConditionalPickDeep returns {} instead of never:
import type {ConditionalPickDeep} from 'type-fest';
type Example = {
a: string;
b: string | boolean;
c: {
d: string;
e: {
f?: string;
g?: boolean;
};
j: boolean;
};
};
type NumberPick = ConditionalPickDeep<Example, number>;
// ^? {} — should be `never`
const test: NumberPick = {
anything: 'is accepted', // No error, but should be
};
ConditionalPick is being fixed in #1197. ConditionalPickDeep has the same behavior and should be addressed separately since it uses a different internal implementation (ConditionalExcept-based).
Same issue as #1197 but for
ConditionalPickDeep.When no keys match the given condition,
ConditionalPickDeepreturns{}instead ofnever:ConditionalPickis being fixed in #1197.ConditionalPickDeephas the same behavior and should be addressed separately since it uses a different internal implementation (ConditionalExcept-based).