type deep = {
isActive: boolean;
count?: number;
description: string | null;
details: {
id: bigint;
name: string;
nested: {
title: string;
subtitle: string;
moreDetails: {
numberId: bigint;
};
};
};
additionalInfo: string | boolean;
}
type A = OmitExactlyByTypeDeep<deep, bigint>
// A results in:
{
isActive: boolean;
count?: number;
description: string | null;
details: {
name: string;
nested: {
title: string;
subtitle: string;
moreDetails: EmptyObject;
};
};
additionalInfo: string | boolean;
}
Get a set of properties from
T
whose type exactly matchesP
.