SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start


From course:

TypeScript

» Start this Course
(Practice similar questions for free)
Question:

What is the difference between nominal and structural type systems? Describe how this applies to type checking.

Author: Kate W



Answer:

Nominal type systems are about names. Structural ones are about structure or shape. The type equivalence check on a function call checks whether the argument is an instance of a class of a given name if nominal. With structural, it doesn't care about which constructor its argument came from, only whether it has the necessary properties.


0 / 5  (0 ratings)

1 answer(s) in total

Author

Kate W
Kate W