Obviously Partial<T> can be applied to the fields to get the same effect as optionality, but the TypeScript compiler debug output is far easier to read with one less layer of generics to unwrap.
In React DOM, attributes are all typed as optional. Indeed, you can construct any DOM node without having specified any attributes.
Obviously
Partial<T>
can be applied to the fields to get the same effect as optionality, but the TypeScript compiler debug output is far easier to read with one less layer of generics to unwrap.In React DOM, attributes are all typed as optional. Indeed, you can construct any DOM node without having specified any attributes.