revolunet / angular-google-analytics

Google Analytics tracking for your AngularJS apps
MIT License
652 stars 179 forks source link

Missing return value #193

Closed Toxantron closed 7 years ago

Toxantron commented 7 years ago

When updating the typescript interface an inconsistency in the return value for the two methods. They return true at the end, but the intermediate returns imply void.

The meaning of the return value is not documented but I assume it means whether something was created and therefor the intermediate returns now return value.

justinsa commented 7 years ago

Interesting that typescript has those return true when void. There are other return; in this file that would benefit from a similar change. Could you do a sweep and make sure we are using return false; or return true; explicitly?

Toxantron commented 7 years ago

No, what I meant is when trying to create the typescript interface for the service I struggled with identifying its return type for some methods that sometimes return boolean and sometimes void. And return type any is just lazy. ;-)

I will try to find other as well.