I have a function with the following parameter:
const handleAccount = (
account: Partial<IAccountDocument>,
...
) => { ... }
In no way can I change the interface for IAccountDocument to not require certain fields, i.e. I must use Partial<>. How can I make it so that IAccountDocument has specific fields included whilst also being allowed to be partially created?
Use the
Pickutility type to choose some mandatory properties and combine it withPartial<IAccountDocument>.