1//You can simply create a new type, say, DeepPartial, which basically references itself:
2type DeepPartial<T> = {
3 [P in keyof T]?: DeepPartial<T[P]>;
4};
5
6//Then, you can use it as such:
7const foobar: DeepPartial<Foobar> = {
8 foo: 1,
9 bar: { baz: true }
10};