Currently, I am utilizing a PartialDeep
feature from the library type-fest. Here is an example of how I am using it with a const
:
const test = {
value: 1,
secondLevel: {
value: 1,
thirdLvl: {
value: 1,
fifthLvl: {
value: 1
}
}
}
}
With my current set up, the defined type looks like this:
type PD = {
value?: number;
secondLevel?: {
value?: number;
thirdLvl?: {
value?: number;
fifthLvl?: {
value?: number
}
}
}
}
However, I am encountering an issue where only one level of optional properties is being recognized. Can anyone provide insight into this or suggest a workaround solution? Your help is much appreciated. Thank you.