| |
Say you now have a function printAddress which takes an Address type as its arg.
| |
Your editor (before TS@4) would hint that the arguments were something like:
address_0: number, address_1: string, ...etc
which is not really helpful because address_0: number doesn’t really explain what that parameter corresponds to. With Labled Tuple Types we can do
| |
NOTE: once you begin to label an element in a type definition, you must label all of the other elements.
Now you get a hint like:
streetNumber: number, city: string, ...etc
which is crystal clear.