type DeepRequired<T> = { [K in keyof T]-?: DeepRequired<NonNullable<T[K]>> } With that, she transformed the garbage stream into a DeepRequired<CargoManifest> . Every field that could be undefined? Now illegal. Every null that used to slip through? Compile-time error.
“Give me 45 minutes,” she said.
Because types aren’t just constraints.