`PickDeep` strips `null`
Author: relsunkaevCreated May 15, 2024Updated Jul 13, 2026
Labelsbugcomponent:paths
If you have following types
type Owner = {
name: string;
age: number;
};
type Pet = {
name: string;
age: number;
owner: Owner | null;
};the resulting type of PickDeep<Pet, "name" | "owner.name"> is
type Result = {
name: string;
// `owner` is no longer nullable
owner: {
name: string;
};
}Source: sindresorhus/type-fest