📅  最后修改于: 2022-03-11 14:48:22.708000             🧑  作者: Mango
//You can simply create a new type, say, DeepPartial, which basically references itself:
type DeepPartial = {
[P in keyof T]?: DeepPartial;
};
//Then, you can use it as such:
const foobar: DeepPartial = {
foo: 1,
bar: { baz: true }
};