I like your article. Just want to add some clarity in the Required example.
Todo and Required<Todo> will behave quite similar considering your example? For instance, if you miss some property in the todoWithRequired object you will see the same type error.
However if you set some properties as optional in Todo type (let it be isFinished?: boolean or whatever), the different between Todo and Required<Todo> will be more clear, I guess. The object with type Todo will be OK without specifying these optional properties, but not Required<Todo>.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I like your article. Just want to add some clarity in the
Required
example.Todo
andRequired<Todo>
will behave quite similar considering your example? For instance, if you miss some property in thetodoWithRequired
object you will see the same type error.However if you set some properties as optional in
Todo
type (let it beisFinished?: boolean
or whatever), the different betweenTodo
andRequired<Todo>
will be more clear, I guess. The object with typeTodo
will be OK without specifying these optional properties, but notRequired<Todo>
.