fixed typo and added typehinting to getServiceConfig