TypeScript has a really neat way of changing the required-ness of fields in objects. Partial<Foo> is the same shape as Foo, but all the fields are optional. Required<Foo> is the same shape as foo but all the fields are required. https://stackoverflow.com/a/40076355/509706