Dog and Person are structurally the same so you can assign a person to a dog and vice versa. But that's just how structural typing works and as a user of TypeScript I haven't run into a case where this'd be an issue.
[1] https://gist.github.com/dcolthorp/aa21cf87d847ae9942106435bf...
[2] https://dev.to/gcanti/functional-design-smart-constructors-1...