Hi, I have an unfortunate need to have the same type using nulls and using undefined, but, of course, not both.
I have a system ( that some one here helped me build. Thank you. ) that converts nulls into undefineds. Today I'm trying to reverse it and I find that it creates
type X = {
x?: string | null
}
when what I need is
type X = {
x: string | null
}
the pertinent part of the code is
export type RecursivelyReplaceUndefinedWithNull<T> = T extends undefined
? null
then it recurses through the properties.
I feel like it could be done with property maps but I'm not sure how.
thanks