The outer bands of the storm lashed Hong Kong overnight with heavy rain and strong winds but the city was spared a direct hit as the typhoon veered west towards Hainan.