miniblog.

← Back to all posts
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.