TypeScript handbook
The official reference for the tools used in this lesson.
Lesson 1.1
TypeScript compares shapes, not names. Two unrelated types are interchangeable if their members line up, which explains most surprising assignability errors.
TypeScript compares shapes, not names. Two unrelated types are interchangeable if their members line up, which explains most surprising assignability errors.