Attributes in a Lightning Component have declared types. But, with few exceptions, the type you use has never seemed to make much difference. Sure, it makes sense to declare the type correctly, but the framework didn’t seem to care whether you did or not.
Here, a principal developer of the Lightning Framework explains how these types are (and are not) used
When writing a component, you can set a variable to have a specific type on both the client side and on the server via Apex. But how is that being used by Aura, the underlying framework of Lightning Components? And how does the type you set in Apex relate directly to the client?