結果 : typescript check if method exists