I need to use type without optional fields and convert this type to required fields with type “value | undefined” for optional keys only. How can I do it?
for example:
we have a type:
interface AnyObject {
a: string;
b?: number;
}
my new type must convert this to type to:
interface CorrectAnyObject {
a: string;
b: number | undefined;
}