Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
11 replies
6enton

Modifying inferred type of deeply nested object

Hi folks,

Say I have a deeply nested object that I'm inferring types of.
type MyObj = typeof myObj

But I'm not happy with some of the inferred types. For example (I know...🙄 ) I have a type that is undefined but needs to be of type undefined | boolean.
How can I easily modify that nested type? And do it many times with different nested values?
Was this page helpful?