Use type hinting in ApiBase

For ideological reasons this was not included in Ie6bf1915.

Change-Id: I5f7119665746eb6fcf86c3a403caa2dcb67904eb