Type declarations are still quite limited, though. For example, you can declare that a function returns an array or a string, but not an array of strings.
Use a class if you need them.
Use a class if you need them.